Tentin tekstisisältö

COMP.SE.200 Software Testing - 20.12.2023

Tentin tekstisisältö

Teksti on luotu tekstintunnistuksella alkuperäisestä tenttitiedostosta, joten se voi sisältää virheellistä tai puutteellista tietoa. Esimerkiksi matemaattisia merkkejä ei voida esitää oikein. Tekstiä käytetään pääasiassa hakutulosten luomiseen.

Alkuperäinen tentti
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?

 


Käytämme evästeitä

Tämä sivusto käyttää evästeitä, mukaanlukien kolmansien puolten evästeitä, vain sivuston toiminnan kannalta välttämättömiin tarkoituksiin, kuten asetusten tallentamiseen käyttäjän laitteelle, käyttäjäistuntojen ylläpitoon ja palvelujen toiminnan mahdollistamiseen. Sivusto kerää käyttäjästä myös muuta tietoa, kuten käyttäjän IP-osoitteen ja selaimen tyypin. Tätä tietoa käytetään sivuston toiminnan ja tietoturvallisuuden varmistamiseen. Kerättyä tietoa voi päätyä myös kolmansien osapuolten käsiteltäväksi sivuston palvelujen tavanomaisen toiminnan seurauksena.

FI / EN