Question 1 Fundamentals of software testing

Download the article Why is Testing Software Hard? written by Len DiMaggio (available in module Topic 1). It was written more than 10 years ago, so some of the examples in it are a bit dated. Also youll need to read around a few typos. None of these, of course, takes anything away from its informative and still highly relevant content.

Read the article, keeping in mind the question it sets out to answer. Now write down in your own words what you think the answer it gives. Next, in a separate section, write your own comments on this answer. For maximum credit, make sure to cover and critique all the points raised in the article.

Question 2 - White box testing

a) Consider the pseudocode program below.

Input (score);
If score < 60 then
print ('fail');
else
print ('pass');
If score > 80 then
print ('with distinction');
End

How many feasible paths are there for this program?

Define a set of test cases that gives you 100% coverage of all feasible paths. Each test case should consist of a test input value with expected input (usually presented as a row in a table)

b) Given below is an example program listing (s and c represent a statement and a condition respectively):

s1;
if (c1) s2;
else s3;
s4;
if (c2) s5;
else if (c3) s6;
else s7;
s8;

(Note: "if (c) sn" means if condition c is true then execute statement sn)

Create the control flow diagram for the above program. Use this diagram to calculate the programs cyclomatic complexity C. Based on this value of C, how many tests will be needed for full coverage of all independent execution paths in the program? List these paths in terms of the constituent statements and truth values of conditions for example, one of the paths for this problem is: s1, !c1, s3, s4, c2, s5, s8.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.