Quiz Space

September 2022 term · Software Testing · BSCS3002

Software Testing Quiz 1: 16 October 2022, Set QPF1 (September 2022 term)

The IIT Madras BS Software Testing (Software Testing) Quiz 1 paper sat on 16 Oct 2022, in the September 2022 term, set QPF1: 14 questions for 63 marks in 120 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.

Questions
14
Marks
63
Duration
120 min
MCQ
10
MSQ
3
Numerical
1

Updated

Official paper: 2022 Oct: IIT M QUIZ 1 DEGREE QPG3 · No negative marking.

Question 1

+3 marksOne correct option

Which of the following represents the order in which artifacts are written in test driven development?

  1. A

    Code followed by test cases.

  2. B

    Test cases followed by code.

Show answer

Correct answer

  • B

    Test cases followed by code.

Question 2

+3 marksOne correct option

Which of the following is true about def-clear paths with respect to a variable v?

  1. A

    The variable v is not defined along the path.

  2. B

    The variable v is not given another value along the path

  3. C

    The variable v is defined once but is not used along the path.

  4. D

    The variable v is defined and used along the path.

Show answer

Correct answer

  • B

    The variable v is not given another value along the path

Question 3

+4 marksOne correct option

A test case is said to have passed when which of the following holds?

  1. A

    The actual output is different from expected output but there is no error.

  2. B

    The actual output is the same as the expected output.

  3. C

    The software produces an output successfully upon giving an input

  4. D

    There is a message that there is no error from the program.

Show answer

Correct answer

  • B

    The actual output is the same as the expected output.

Question 4

+5 marksOne correct option

Which of the following represents the correct order of subsumption amongst data-flow coverage criteria in graphs? Read the symbol → below as “subsumes”.

  1. A

    All-defs-coverage → all-du-paths-coverage → all-uses-coverage.

  2. B

    All-defs-coverage → all-uses-coverage → all-du-paths-coverage.

  3. C

    All-du-paths-coverage → all-uses-coverage → all-defs-coverage.

  4. D

    All-du-paths-coverage → all-defs-coverage → all-uses-coverage

Show answer

Correct answer

  • C

    All-du-paths-coverage → all-uses-coverage → all-defs-coverage.

Question 5

+6 marksOne correct option
  1. A

    It accepts all the binary strings having an odd number of 0s.

  2. B

    It accepts all the binary strings having an odd number of 1s.

  3. C

    It accepts all the binary strings having an odd number of 0s and an oddnumber of 1s.

  4. D

    It accepts all the binary strings having an even number of 0s and an evennumber of 1s.

Show answer

Correct answer

  • B

    It accepts all the binary strings having an odd number of 1s.

Question 6

+5 marksOne or more correct options

For a tester to observe an error or a fault in a particular location of a program, which of the following should be true together?

Select all that apply.

  1. A

    The location of the program should be reachable by the test case given by thetester.

  2. B

    The state of the program must be incorrect at that location of the program.

  3. C

    The final state of the program should be incorrect.

  4. D

    The tester should see the error in the program.

Show answer

Correct answers

  • A

    The location of the program should be reachable by the test case given by thetester.

  • B

    The state of the program must be incorrect at that location of the program.

  • C

    The final state of the program should be incorrect.

Question 7

+5 marksOne or more correct options

Select all that apply.

  1. A

    a=5, b=7

  2. B

    a=5, b=5

  3. C

    a=8, b=7

  4. D

    a=0, b=1

Show answer

Correct answers

  • A

    a=5, b=7

  • D

    a=0, b=1

Question 8

+6 marksOne or more correct options

Consider that a coverage criteria C1 subsumes coverage criteria C2. Also that there exists a test set T1 that satisfies C1 on some code base B and another test set T2 that satisfies C2 on the same code base B.
Select the statements that are correct for the above scenario.

Select all that apply.

  1. A

    T1 will necessarily satisfy C2.

  2. B

    T2 wil necessarily satisfy C1

  3. C

    If T2 exposes some fault in B implies that T1 will also be able to expose thesame fault.

  4. D

    None of these

Show answer

Correct answer

  • B

    T2 wil necessarily satisfy C1

Question 9

+4 marksNumerical answer
Show answer

Correct answer: 2

Question 10

+6 marksOne correct option

Consider the annotated CFG (for dataflow coverage) given below and answer the given subquestions.

Consider the annotated CFG (for dataflow coverage) given below and answer the given subquestions.

How many du-pairs are there for the variable m?

  1. A

    8

  2. B

    9

  3. C

    10

  4. D

    11

Show answer

Correct answer

  • C

    10

Question 11

+6 marksOne correct option

Consider the annotated CFG (for dataflow coverage) given below and answer the given subquestions.

Consider the annotated CFG (for dataflow coverage) given below and answer the given subquestions.

How many unique du-paths are there for the variable m?

  1. A

    7

  2. B

    8

  3. C

    9

  4. D

    10

Show answer

Correct answer

  • A

    7

Question 12

+5 marksOne correct option

Consider the CFG given below and answer the given subquestions.

Consider the CFG given below and answer the given subquestions.

How many test requirements are there for edge-pair coverage?

  1. A

    10

  2. B

    11

  3. C

    12

  4. D

    13

Show answer

Correct answer

  • C

    12

Question 13

+6 marksOne correct option

Consider the CFG given below and answer the given subquestions.

Consider the CFG given below and answer the given subquestions.

How many simple paths are present in the given CFG?

  1. A

    27

  2. B

    29

  3. C

    31

  4. D

    36

Show answer

Correct answer

  • D

    36

Question 14

+5 marksOne correct option

Consider the CFG given below and answer the given subquestions.

Consider the CFG given below and answer the given subquestions.

How many test requirements are there for prime path coverage?

  1. A

    10

  2. B

    11

  3. C

    12

  4. D

    13

Show answer

Correct answer

  • B

    11