Computer Science homework help. ISM 4432/6145 – SOFTWARE TESTING
SPRING SEMESTER 2020
TESTING ASSIGNMENT 3 – Due: April 1, 2020
Structural Software Testing
The goal of this testing assignment is for you to perform structural, white-box testing on a software program that calculates the Greatest Common Divisor of a pair of integers. The program accepts integer inputs (X, Y) and outputs GCD (Z). Refer to the pseudocode Euclid’s algorithm of the program on the next page. This assignment requires the following tasks:
1) Analysis – Analyze the program, number the statements in it as shown in the algorithm and generate a program graph. After a thorough analysis of the graph, discuss how many paths in the program should be tested and illustrate three typical paths through the program.
2) Decision-to-Decision Path Testing – Generate a DD-Path graph of the given program by referring to the program graph generated in the previous step. Refer to the DD-Path graph and pick a set of DD-Paths that based on your analysis when tested will achieve complete test coverage C1 of the program. Generate and execute test cases based on these DD-Paths. Present the analysis that led to the selection of the tested paths and complete a Structural Test Case Form for each test case run.
4) Defect Reporting – Report defects if any of your test cases result in errors. Prepare test cases using the Structural Test Case Form provided. Refer to the Structural Test Case Form Help for help with the terms used in the form. Use the Defect Reporting Form provided to log each defect.
Submit your Testing Assignment #3 together in a single Word file by the end of the day on April 1, 2020 in the Assignment area on. Make sure that you include your name, course number and assignment number in the name of the file to make it identifiable. The class Teaching Assistant –) is available before the due date to review your work and provide feedback on correct use of the testing techniques. I am also available to review your use of the testing techniques and provide feedback on presentation of the final report. This assignment will be worth 10% of the course grade.
Happy bug hunting!
Algorithm for Program GCD.java
1 begin
2 int x, y;
3 input (x, y);
4 while (x ≠ y) do
5 if(x > y)
6 x=x-y
7 else
8 y=y-x
9 endif;
10 endwhile;
11 output(x);
12 end.
GCD.java Code
package newPackage;
import java.util.Scanner;
public class GCD
{
public static void main(String arg[])
{
int x,y;
//Making Scanner object for taking input from user
Scanner sc=new Scanner(System.in);
System.out.println(“Enter the first integer”);
x=sc.nextInt();
System.out.println(“Enter the second integer”);
y=sc.nextInt();
while(x!=y)
{
if(x > y)
x=x-y;
else
y=y-x;
}
System.out.println(“Greatest Common Divisor is ” +x);
}
}
Executing the GCD.java Program Using
Eclipse
1. Eclipse is required to run this program.
2 Download Eclipse from http://www.eclipse.org/downloads/
Note: – If Java runtime environment is missing for eclipse, Install it from
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
3 To execute, go to run->run
4 To check for coverage of statements within a path you may click on run tab and click on toggle Break Point and use the Debug option from run tab to step through each statement.
Note: if you would like to use any other IDE, GCD.java is available in the files in the canvas.
STRUCTURAL TEST CASE FORM
Test Case ID
Program
Purpose of Test Case
Structural Test Type
Path Being Tested
Pre-Conditions
Inputs
Expected Outputs
All statements in path covered as expected?
Post-Conditions
Execution History Date Result Tester
Help on filling the structural test case form
TEST CASE ID: Develop a consistent method for identifying your test cases.
PROGRAM: The program being tested.
PURPOSE OF TEST CASE: Briefly describe the purpose of the test case.
STRUCTURAL TEST TYPE:
 DD-path Testing
PATH BEING TESTED: List the DD-path e.g.< 1-2-3-4-5> that you are testing.
PRE-CONDITIONS: Describe the environment and circumstances that hold prior to test case execution.
INPUTS: These would be the specific values for the variables involved in the path being tested.
EXPECTED OUTPUT: Summary of how the function is supposed to behave on inputting the parameter values.
ALL STATEMENTS IN PATH COVERED AS EXPECTED?: Answer ‘YES’ if all the statements in the path tested behave as expected i.e. a certain loop to be entered or an ‘IF’ statement to be true. If not answer ‘NO’ and list the concerned statements and describe behavior that doesn’t match with that expected.
POST-CONDITIONS: Describe the environment and circumstances that hold after execution of the test case.
EXECUTION HISTORY: A repeating group based on the number of times the test is run. It is made up of:
DATE: Date that the test case is run.
RESULT: Does the actual output match the expected output? If not, should this be recorded as a failure resulting in a defect report?
TESTER: Name of person executing the test case.
DEFECT REPORTING FORM
DEFECT ID:
TITLE: COMPONENT:
REPORTED BY: SUBCOMPONENT:
REPORTED ON: VERSION:
PLATFORM: RESOLUTION PRIORITY:
OPERATING SYSTEM: RESOLUTION SEVERITY:
RELATED TEST CASE IDS: CONSISTENCY:
DEFECT SUMMARY:
STEPS TO REPRODUCE:
COMMENTS:
ATTACHMENTS:
1.
2.
For evaluators use only
DEFECT STATUS: _________APPROVED _________ REJECTED
REASON: ________________________________________________

Computer Science homework help