Assignment 3: Software Testing [25 pts total]

Answer all questions below — one tab per question. Your answers auto-save in this browser; export them as JSON at the bottom when done.

Q1 Test Scaffolding Concepts [2 pts]

Multiple answers may apply unless otherwise stated.

Q1.1 [1 pt]

Which of the following may be used as test scaffolding?

Q1.2 [1 pt]

Consider the following test scaffolding code.


  

The real data source has not yet been integrated. During the test, FixedDataSource supplies predefined records to ReportGenerator.

How should FixedDataSource be classified?

Q2 Combinatorial Testing [4 pts]

A web application supports the following parameters:

Browser:        Chrome, Firefox
Authentication: Password, SSO
Region:         AU, US

Exactly one option is correct for each question.

Q2.1 Selecting a Pairwise Covering Array [2 pts]

Which option is a smallest pairwise covering array?

Q2.2 Increasing the Interaction Strength [2 pts]

If the required interaction strength is increased from pairwise testing to three-way testing, how many tests are required to cover every combination of the three parameters?

Q3 Integration Testing [5 pts]

Consider a system with the following dependencies:

CheckoutController
        |
        v
OrderService
   |           |
   v           v
InventoryService   PaymentGateway

Fill in the blanks. [1 pt each, 5 blanks]

Q4 Metamorphic Oracle and Mutation Testing [8 pts]

Consider the following program.



  

Initial test suite:



  

Assume that none of the following mutants is equivalent to the original program.

MutantChange
M1hours >= 8 → hours > 8
M2fee = 14 → fee = 15
M3if weekend → if not weekend
M4fee -= 2 → fee -= 1

Q4.1 Mutant Status [2 pts]

For each mutant, write Killed or Survived under the initial test suite.

Q4.2 Metamorphic Test Oracle [2 pts]

For any hours >= 8 and positive integer increase, increasing the parking duration should not change the parking fee. The values of weekend and member must remain unchanged.

Complete the metamorphic oracle. It may call parking_fee exactly twice and must not directly assert a particular fee value.

Your answer

Q4.3 Mutation Score [2 pts]

Compute the mutation score of the initial test suite.

Q4.4 Improving the Test Suite [2 pts]

Give one source input and its metamorphic follow-up that kill every mutant surviving the initial test suite.

Then write the corresponding direct regression test.

Q5 Coverage-Guided Fuzzing [6 pts]

2.5 pts for each of the two bugs found, plus 1 pt for reaching full edge coverage.

Student ID