Quiz Space

September 2022 term · Software Testing · BSCS3002

Software Testing Quiz 1: 16 October 2022, Set QPG2 (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 QPG2: 13 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
13
Marks
63
Duration
120 min
MCQ
10
MSQ
2
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
  1. A

    1-B, 2-C, 3-A

  2. B

    1-C, 2-A, 3-B

  3. C

    1-C, 2-B, 3-A

  4. D

    1-B, 2-A, 3-C

Show answer

Correct answer

  • B

    1-C, 2-A, 3-B

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 that have an odd number of 0s.

  2. B

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

  3. C

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

  4. D

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

Show answer

Correct answer

  • C

    It accepts all the binary strings that have an odd number of 0s and an oddnumber 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

+4 marksNumerical answer
Show answer

Correct answer: 3

Question 9

+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 n?

  1. A

    6

  2. B

    7

  3. C

    8

  4. D

    9

Show answer

Correct answer

  • A

    6

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 unique du-paths are there for the variable n?

  1. A

    5

  2. B

    6

  3. C

    7

  4. D

    8

Show answer

Correct answer

  • B

    6

Question 11

+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

  • A

    10

Question 12

+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

    25

  2. B

    27

  3. C

    29

  4. D

    31

Show answer

Correct answer

  • B

    27

Question 13

+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

    8

  2. B

    9

  3. C

    10

  4. D

    11

Show answer

Correct answer

  • C

    10