Quiz Space

January 2024 term · Software Testing · BSCS3002

Software Testing Quiz 1: 25 February 2024, Set 3 (January 2024 term)

The IIT Madras BS Software Testing (Software Testing) Quiz 1 paper sat on 25 Feb 2024, in the January 2024 term, set 3: 22 questions for 104 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
22
Marks
104
Duration
120 min
MCQ
15
MSQ
4
Written
3

Updated

Official paper: IIT M DEGREE AN4 EXAM QDB4 25 Feb 2024 · No negative marking.

Question 1

+1 markOne correct option

THIS IS QUESTION PAPER FOR THE SUBJECT "DEGREE LEVEL : SOFTWARE TESTING (COMPUTER BASED EXAM)" ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT? CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN. (IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)

  1. A

    YES

  2. B

    NO

Show answer

Correct answer

  • A

    YES

Question 2

+5 marksOne correct option

Which of the following approaches to integration testing does not require scaffolding?

  1. A

    Top-down

  2. B

    Bottom-up

  3. C

    Sandwich

  4. D

    Big bang

Show answer

Correct answer

  • D

    Big bang

Question 3

+5 marksOne correct option

Consider an organization whose purpose of testing is to show the correctness of the software. Identify the process maturity based on the test goal of the organization.

  1. A

    Level 0

  2. B

    Level 1

  3. C

    Level 2

  4. D

    Level 3

Show answer

Correct answer

  • B

    Level 1

Question 4

+5 marksOne correct option

Match the following based on different levels of testing.

Match the following based on different levels of testing.

Match the following based on different levels of testing.
  1. A

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

  2. B

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

  3. C

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

  4. D

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

Show answer

Correct answer

  • D

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

Question 5

+6 marksOne correct option

Consider the control flow graph (CFG) below.

Consider the control flow graph (CFG) below. From the following code segments identify the one that is best presented by the given CFG.

Consider the control flow graph (CFG) below.
  1. A
    Figure from the original question paper
  2. B
    Figure from the original question paper
  3. C
    Figure from the original question paper
  4. D
    Figure from the original question paper
Show answer

Correct answer

  • C
    Figure from the original question paper

Question 6

+6 marksOne correct option

Consider the code below.

Consider the code below. Identify the appropriate condition such that the execution will reach the error statement in LINE-1.

Consider the code below.
  1. A

    (x 5) && (y < 0)

  2. B

    (x < y) && (x < 5) && (y <= 0)

  3. C

    (x < y) && (x < 4) && (y < 1)

  4. D

    (x < y) && (x < 4) && (y <= 1)

Show answer

Correct answer

  • C

    (x < y) && (x < 4) && (y < 1)

Question 7

+6 marksOne correct option

Consider the prime path [1, 2, 4] and a path P = [1, 2, 3, 2, 4, 2, 3, 4]. From among the given options, identify the path with a detour but not a sidetrip.

  1. A

    [1, 2, 4]

  2. B

    [1, 2, 3, 2, 4]

  3. C

    [1, 2, 3, 4]

  4. D

    [1, 2, 4, 2, 4]

Show answer

Correct answer

  • C

    [1, 2, 3, 4]

Question 8

+6 marksOne correct option

Consider the following classes for the code base to be tested and the test class.

Consider the following classes for the code base to be tested and the test class.

Consider the following classes for the code base to be tested and the test class. Identify the test case method that will fail for the given code base.

Consider the following classes for the code base to be tested and the test class.
Consider the following classes for the code base to be tested and the test class.
  1. A

    testcase1()

  2. B

    testcase2()

  3. C

    testcase3()

  4. D

    testcase4()

Show answer

Correct answer

  • D

    testcase4()

Question 9

+6 marksOne correct option

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

Consider the finite state machine (FSM) as given below. Identify the statement that correctly describes the given FSM.

Consider the finite state machine (FSM) as given below.
  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

  • D

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

Question 10

+5 marksOne or more correct options

Which of the following is/are represented by the nodes in graph models for integration testing?

Select all that apply.

  1. A

    Modules

  2. B

    Interfaces

  3. C

    Test stubs

  4. D

    Test Drivers

Show answer

Correct answers

  • A

    Modules

  • C

    Test stubs

  • D

    Test Drivers

Question 11

+5 marksOne or more correct options

Consider the CFG given below.

Consider the CFG given below. From the following options, identify all the valid test paths.

Consider the CFG given below.

Select all that apply.

  1. A

    [1, 2, 3, 5, 6, 1]

  2. B

    [1, 2, 3, 5, 2, 4, 5, 6]

  3. C

    [1, 2, 3, 5, 2, 3, 5, 6, 1, 2, 3, 5, 6]

  4. D

    [1, 2, 3, 4, 5, 6, 1, 2, 5, 6]

Show answer

Correct answers

  • B

    [1, 2, 3, 5, 2, 4, 5, 6]

  • C

    [1, 2, 3, 5, 2, 3, 5, 6, 1, 2, 3, 5, 6]

Question 12

+5 marksOne or more correct options

Which of the following conditions is/are required to be satisfied such that a path can be considered as a chain (to define DD-path) in a CFG?

Select all that apply.

  1. A

    Initial and terminal vertices are distinct.

  2. B

    Any one interior vertices should have out-degree as 2.

  3. C

    All the interior vertices have both in-degree and out-degree as 1.

  4. D

    All the interior vertices have both in-degree and out-degree as ≥1.

Show answer

Correct answers

  • A

    Initial and terminal vertices are distinct.

  • C

    All the interior vertices have both in-degree and out-degree as 1.

Question 13

+5 marksOne or more correct options

Which of the following statements is/are true?

Select all that apply.

  1. A

    Prime path coverage subsumes all du-paths coverage.

  2. B

    Edge-pair coverage subsumes prime path coverage.

  3. C

    Node coverage subsumes edge coverage.

  4. D

    Edge-pair coverage subsumes edge coverage.

Show answer

Correct answers

  • A

    Prime path coverage subsumes all du-paths coverage.

  • D

    Edge-pair coverage subsumes edge coverage.

Question 14

+6 marksOne correct option

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.

What are the minimum number of test cases to be prepared for node coverage and edge coverage?

  1. A

    It is 1 for both node coverage and edge coverage.

  2. B

    It is 1 for node coverage, and 3 for edge coverage.

  3. C

    It is 3 for both node coverage and edge coverage.

  4. D

    It is 2 for node coverage, and 3 for edge coverage.

Show answer

Correct answer

  • B

    It is 1 for node coverage, and 3 for edge coverage.

Question 15

+5 marksOne correct option

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.

What is the cyclomatic complexity of the given CFG?

  1. A

    3

  2. B

    4

  3. C

    5

  4. D

    6

Show answer

Correct answer

  • B

    4

Question 16

+6 marksOne correct option

Consider the CFG given below.

Consider the CFG given below. Based on the above data, answer the given subquestions.

Consider the CFG given below.

Find the number of test requirements for prime path coverage.

  1. A

    5

  2. B

    6

  3. C

    7

  4. D

    8

Show answer

Correct answer

  • C

    7

Question 17

+6 marksOne correct option

Consider the CFG given below.

Consider the CFG given below. Based on the above data, answer the given subquestions.

Consider the CFG given below.

Identify the correct set of test paths for prime path coverage.

  1. A

    {[1, 6], [1, 2, 5, 6], [1, 2, 3, 4, 3, 4, 3, 5, 6]}

  2. B

    {[1, 6], [1, 2, 3, 4, 3, 5, 6]}

  3. C

    {[1, 6], [1, 2, 5, 6], [1, 2, 3, 5, 6], [1, 2, 3, 4, 3, 5, 6]}

  4. D

    {[1, 6], [1, 2, 5, 6], [1, 2, 3, 5, 6], [1, 2, 3, 4, 3, 4, 3, 5, 6]}

Show answer

Correct answer

  • D

    {[1, 6], [1, 2, 5, 6], [1, 2, 3, 5, 6], [1, 2, 3, 4, 3, 4, 3, 5, 6]}

Question 18

+6 marksOne correct option

Consider the annotated control flow graph (CFG) given below.

Consider the annotated control flow graph (CFG) given below. Based on the above data, answer the given subquestions.

Consider the annotated control flow graph (CFG) given below.

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

  1. A

    4

  2. B

    6

  3. C

    8

  4. D

    12

Show answer

Correct answer

  • B

    6

Question 19

+6 marksOne correct option

Consider the annotated control flow graph (CFG) given below.

Consider the annotated control flow graph (CFG) given below. Based on the above data, answer the given subquestions.

Consider the annotated control flow graph (CFG) given below.

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

  1. A

    4

  2. B

    5

  3. C

    6

  4. D

    7

Show answer

Correct answer

  • A

    4

Question 20

+1 markWritten answer

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.
Show answer

A written answer, not marked automatically.

Question 21

+1 markWritten answer

Consider the CFG given below.

Consider the CFG given below. Based on the above data, answer the given subquestions.

Consider the CFG given below.
Show answer

A written answer, not marked automatically.

Question 22

+1 markWritten answer

Consider the annotated control flow graph (CFG) given below.

Consider the annotated control flow graph (CFG) given below. Based on the above data, answer the given subquestions.

Consider the annotated control flow graph (CFG) given below.
Show answer

A written answer, not marked automatically.