Quiz Space

May 2023 term · Software Testing · BSCS3002

Software Testing Quiz 1: 16 July 2023 (May 2023 term)

The IIT Madras BS Software Testing (Software Testing) Quiz 1 paper sat on 16 Jul 2023, in the May 2023 term: 17 questions for 100 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
17
Marks
100
Duration
120 min
MCQ
13
MSQ
4

Updated

Official paper: IIT M DEGREE AN2 EXAM QPE2 16 JULY 2023 · No negative marking.

Question 1

+4 marksOne correct option

Consider the control flow graph (CFG) below.

What are the minimum numbers of test paths are required for node and edge coverage?

  1. A

    Minimum 1 test path for both node and edge coverage.

  2. B

    Minimum 2 test paths for both node and edge coverage.

  3. C

    Minimum 1 test path for node coverage and 2 test paths for edge coverage.

  4. D

    Minimum 2 test path for node coverage and 3 test paths for edge coverage.

Show answer

Correct answer

  • C

    Minimum 1 test path for node coverage and 2 test paths for edge coverage.

Question 2

+4 marksOne correct option

Match the following.

  1. A

    1-D, 2-A, 3-C, 4-B

  2. B

    1-D, 2-C, 3-A, 4-B

  3. C

    1-B, 2-C, 3-A, 4-D

  4. D

    1-B, 2-A, 3-C, 4-D

Show answer

Correct answer

  • B

    1-D, 2-C, 3-A, 4-B

Question 3

+4 marksOne correct option

Consider the CFG given below and answer the subquestions.

Find the number of test requirements for edge pair coverage.

  1. A

    9

  2. B

    10

  3. C

    11

  4. D

    12

Show answer

Correct answer

  • D

    12

Question 4

+6 marksOne correct option

Consider the CFG given below and answer the subquestions.

Find the number of simple paths.

  1. A

    13

  2. B

    25

  3. C

    37

  4. D

    42

Show answer

Correct answer

  • D

    42

Question 5

+8 marksOne correct option

Consider the CFG given below and answer the subquestions.

Find the number of prime paths.

  1. A

    12

  2. B

    13

  3. C

    14

  4. D

    15

Show answer

Correct answer

  • B

    13

Question 6

+8 marksOne correct option
  1. A

    1-B, 2-A, 3-C

  2. B

    1-B, 2-C, 3-A

  3. C

    1-C, 2-B, 3-A

  4. D

    1-C, 2-A, 3-B

Show answer

Correct answer

  • B

    1-B, 2-C, 3-A

Question 7

+8 marksOne correct option

Consider the following control flow graph (CFG).

From the following code segments identify the one that is best presented by the given CFG.

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • D

Question 8

+8 marksOne or more correct options

Select all that apply.

  1. A
  2. B
  3. C
  4. D
  5. E
Show answer

Correct answers

  • B
  • D

Question 9

+6 marksOne correct option

Consider the finite state machine (FSM) as given below.

Identify the statement that correctly describes the given FSM.

  1. A

    It accepts all strings that have odd number of 0s and odd number of 1s.

  2. B

    It accepts all strings that have even number of 0s and even number of 1s.

  3. C

    It accepts all strings that have odd number of 0s and even number of 1s.

  4. D

    It accepts all strings that have even number of 0s and odd number of 1s.

Show answer

Correct answer

  • C

    It accepts all strings that have odd number of 0s and even number of 1s.

Question 10

+6 marksOne correct option
  1. A

    testcase1()

  2. B

    testcase2()

  3. C

    testcase3()

  4. D

    testcase4()

Show answer

Correct answer

  • B

    testcase2()

Question 11

+6 marksOne correct option

Consider the CFG given below.

Identify the number of linearly independent paths.

  1. A

    3

  2. B

    4

  3. C

    5

  4. D

    6

Show answer

Correct answer

  • B

    4

Question 12

+6 marksOne correct option
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • D

Question 13

+6 marksOne or more correct options

Identify the statement(s) that are true about graph coverage criteria.

Select all that apply.

  1. A

    Node coverage subsumes both edge coverage and edge pair coverage.

  2. B

    Prime path coverage subsumes both edge Coverage and all duPaths Coverage.

  3. C

    All duPaths Coverage subsumes both all uses coverage and all defs coverage.

  4. D

    Edge pair coverage subsumes both all uses coverage and all defs coverage.

Show answer

Correct answers

  • B

    Prime path coverage subsumes both edge Coverage and all duPaths Coverage.

  • C

    All duPaths Coverage subsumes both all uses coverage and all defs coverage.

Question 14

+6 marksOne correct option

Consider the annotated CFG given below and answer the subquestions.

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

  1. A

    8

  2. B

    9

  3. C

    10

  4. D

    11

Show answer

Correct answer

  • B

    9

Question 15

+6 marksOne correct option

Consider the annotated CFG given below and answer the subquestions.

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

  1. A

    4

  2. B

    5

  3. C

    6

  4. D

    7

Show answer

Correct answer

  • B

    5

Question 16

+4 marksOne or more correct options

Which of the following integration testing techniques may use scaffolding?

Select all that apply.

  1. A

    Top-down

  2. B

    Bottom-up

  3. C

    Sandwich

  4. D

    Big bang

Show answer

Correct answers

  • A

    Top-down

  • B

    Bottom-up

  • C

    Sandwich

Question 17

+4 marksOne or more correct options

Consider the annotated CFG given below.

Identify the test case input(s) that test the path [s, v, x, y, z].

Select all that apply.

  1. A

    {a = 10, b = 20, c = 15}

  2. B

    {a = 10, b = 20, c = 30}

  3. C

    {a = 30, b = 20, c = 30}

  4. D

    {a = 30, b = 30, c = 30}

Show answer

Correct answers

  • B

    {a = 10, b = 20, c = 30}

  • D

    {a = 30, b = 30, c = 30}