Exam text content

COMP.SE.200 Software Testing - 20.12.2023

Exam text content

The text is generated with Optical Image Recognition from the original exam file and it can therefore contain erroneus or incomplete information. For example, mathematical symbols cannot be rendered correctly. The text is mainly used for generating search results.

Original exam
023

COMP.SE.200 Software testing Examination ZOM2:2'

No material or calculators are allowed. The maximum points of each question are in parentheses;
the maximum 18 points. Prof. Hannu-Matti Jarvinen will assess the examination.

Please start each question at the top of a page.

1. Define the following terms. 2-4 sentences per term.

Black box testing (1p)
Flaky test(1p)

Fuzz testing (1p)
Negative testing (1p)
Oracle (in testing) (1p)
Testing pyramid

2. Coverage meters (6p)
Consider the following function that computes the roots of ax’+bx+c=0. It returns false, if there is
no real results or a is 0, and true, if there are roots. The root values are returned in parameters r1
and r2.

bool roots (double a, b, c, &r1, &r2)
{

double det = b*b-4*a*c;
if (det < 0 or a == 0) return false; // Both sides of "or" are always evaluated in this example

r1 = sqrt(-b + det) / (2*a);
r2 = sqrt(-b - det) / (2*a);
return true;

}
You are now testing the above function. For each coverage below, explain the coverage very
briefly and tell how many test cases are needed in order to achieve that coverage. Give a set of

such test cases for each coverage.

a) Statement coverage. (1,5p)
b) Decision/branch coverage. (1,5p)

c) Condition coverage. (1,5p)
d) Multiple condition coverage. (1,5p)

3. Test Driven Development (6p)

Describe how test driven development works. What are its benefits and drawbacks? How does it

affect the code quality if compared to other development methods?

 


We use cookies

This website uses cookies, including third-party cookies, only for necessary purposes such as saving settings on the user's device, keeping track of user sessions and for providing the services included on the website. This website also collects other data, such as the IP address of the user and the type of web browser used. This information is collected to ensure the operation and security of the website. The collected information can also be used by third parties to enable the ordinary operation of the website.

FI / EN