Assignment_1_SW_Testing
Assignment_1_SW_Testing
Assignment 1
In this assignment, you will practice activities covering the concepts taken in the course so far,
through two main tasks as follows:
Task 1
Below is one faulty program. It includes test inputs that result in failure. Answer the following
questions about this program.
Program:
a) Explain what is wrong with the given code. Describe the fault precisely by proposing a
modification to the code.
b) If possible, give a test case that executes the fault, but does not result in an error state. If not,
briefly explain why not.
c) If possible, give a test case that results in an error, but not a failure. If not, briefly explain why
not. Hint: Don't forget about the program counter.
d) if possible, give a test case that results in a failure. If not, briefly explain why not. Note: for
credit, your test case must not be the same as the given test case.
e) For the given test case
// test input: arr = [90.5, -65.0, 72.25]
// expected = 32.58
Describe the first error state. Be sure to describe the complete state.
Task 1 deliverables:
1. A report showing a detailed answer for each step for the above function from (a) to (e). This
report can be a word document, or a set of compressed scanned pictures.
Task 2
Objectives
Description
• In this task, you will study the open source code of "GeoProject" attached.
Task 2 deliverables:
2. A report of all the test cases you have developed for the classes mentioned above, with full
reasoning of the partitions, the boundary values, and the chosen coverage criteria with
complete explanation. In the written report, you should discuss how you are designing the test
cases. This report can be a word document, or a set of compressed scanned pictures.
3. A testing package, with a test class for each class mentioned above (please follow java
coding/naming standards).
Things to consider for task 2
• You can use JUnit or TestNG or any other java unit testing library if you please.
• Failing reasons for each unit test case should specifically be one reason.
Late submission policy: Late submissions is allowed with a penalty for two days only. A 50%
late submission penalty will be applied after the original deadline.