Quiz Space

September 2022 term · Software Testing · BSCS3002

Software Testing Quiz 2: 20 November 2022 (September 2022 term)

The IIT Madras BS Software Testing (Software Testing) Quiz 2 paper sat on 20 Nov 2022, in the September 2022 term: 12 questions for 75 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
12
Marks
75
Duration
120 min
MSQ
1
MCQ
11

Updated

Official paper: IIT M DEGREE AN2 EXAM QPE1 20 Nov 2022 · No negative marking.

Question 1

+6 marksOne or more correct options

When applying logic criteria to programs, predicates are taken from which of the following statements.

Select all that apply.

  1. A

    for/while loops.

  2. B

    Variable assignment statements like a=5 or a=b+c.

  3. C

    Switch case statements.

  4. D

    If statements.

Show answer

Correct answers

  • A

    for/while loops.

  • C

    Switch case statements.

  • D

    If statements.

Question 2

+8 marksOne correct option

Consider the following CFG.

Consider the following CFG.
What is the number of prime paths for the above CFG?

  1. A

    5

  2. B

    6

  3. C

    7

  4. D

    8

Show answer

Correct answer

  • B

    6

Question 3

+8 marksOne correct option

Consider a software system that computes the monthly electricity charges for domestic usage. The input to the system is an integer that represents the units of electricity consumed, and the output is the electricity bill amount (a real value that is computed as the units consumed X unit charges).
The charge per unit is as follows:

Consider a software system that computes the monthly electricity charges for domestic usage. The input to the system is an integer that represents the units of electricity consumed, and the output is the electricity bill amount (a real value that is computed as the units consumed X unit charges).
The charge per unit is as follows:
What is the minimum number of test cases to be prepared for testing the software system using equivalence class partitioning technique?

  1. A

    3

  2. B

    4

  3. C

    5

  4. D

    6

Show answer

Correct answer

  • C

    5

Question 4

+6 marksOne correct option

Match the following regarding data flow graphs.

Match the following regarding data flow graphs.

  1. A

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

  2. B

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

  3. C

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

  4. D

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

Show answer

Correct answer

  • C

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

Question 5

+6 marksOne correct option

Which of the integration testing approaches starts with the top-level modules as well as the lowest-level modules, followed by the middle-level modules?

  1. A

    Top-down approach

  2. B

    Bottom-up approach

  3. C

    Sandwich approach

  4. D

    Big bang approach

Show answer

Correct answer

  • C

    Sandwich approach

Question 6

+6 marksOne correct option

Consider an integration testing scenario where two units access the same data file. Identify the type of coupling based on the interfaces for this scenario.

  1. A

    Parameter coupling

  2. B

    Shared data coupling

  3. C

    External device coupling

  4. D

    Message-passing interfaces:

Show answer

Correct answer

  • C

    External device coupling

Question 7

+6 marksOne correct option

When it comes to partition-based testing with multiple inputs, which of the following techniques is better than the others?

  1. A

    Equivalence partitioning.

  2. B

    Boundary value analysis.

  3. C

    Partitions and functional testing.

  4. D

    Decision tables.

Show answer

Correct answer

  • D

    Decision tables.

Question 8

+6 marksOne correct option

For the given subquestions, consider a function called NextDate which takes as input a valid date in mm/dd/yyyy (month followed by date followed by year) format and computes the date of the next day. For example, given 06/14/1996, the NextDate function will return 06/15/1996> and when given 02/28/2019>, the NextDate function will return 03/01/2019. Answer the given subquestions regarding input space partitioning test cases for the NextDate function.

What are the variables involved in the NextDate function input?

  1. A

    Month, day and year.

  2. B

    Date containing month, day and year.

  3. C

    Today’s date.

  4. D

    Range of dates.

Show answer

Correct answer

  • B

    Date containing month, day and year.

Question 9

+6 marksOne correct option

For the given subquestions, consider a function called NextDate which takes as input a valid date in mm/dd/yyyy (month followed by date followed by year) format and computes the date of the next day. For example, given 06/14/1996, the NextDate function will return 06/15/1996> and when given 02/28/2019>, the NextDate function will return 03/01/2019. Answer the given subquestions regarding input space partitioning test cases for the NextDate function.

Which of the following are valid partitions for the day, as a part of the input to the NextDate function?

  1. A

    Only one partition: 1 ≤ day ≤ 31.

  2. B

    Two partitions: (1) day > 1 and (2) 30 ≤ day ≤ 31.

  3. C

    Three partitions: (1) 1 ≤ day ≤ 29, (2) day = 30 and (3) day = 31.

  4. D

    Four partitions: (1) 1 ≤ day ≤ 28, (2) day = 29, (3) day = 30 and (4) day = 31.

Show answer

Correct answer

  • D

    Four partitions: (1) 1 ≤ day ≤ 28, (2) day = 29, (3) day = 30 and (4) day = 31.

Question 10

+4 marksOne correct option

For the given subquestions, consider a function called NextDate which takes as input a valid date in mm/dd/yyyy (month followed by date followed by year) format and computes the date of the next day. For example, given 06/14/1996, the NextDate function will return 06/15/1996> and when given 02/28/2019>, the NextDate function will return 03/01/2019. Answer the given subquestions regarding input space partitioning test cases for the NextDate function.

State true or false: The partition
(1) {month: month has 30 days}, (2) {month: month has 31 days}, (3) {month: month is February}
is a valid partition for a month as a part of the input to the NextDate function?

  1. A

    True.

  2. B

    False.

Show answer

Correct answer

  • A

    True.

Question 11

+7 marksOne correct option
  1. A

    GACC (General Active Clause Coverage)

  2. B

    RACC (Restricted Active Clause Coverage)

  3. C

    RICC (Restricted Inactive Clause Coverage)

  4. D

    GICC (General Inactive Clause Coverage)

Show answer

Correct answer

  • C

    RICC (Restricted Inactive Clause Coverage)

Question 12

+6 marksOne correct option

Which rows in the given truth table will make the predicate p false?

  1. A

    Rows 5,7 and 8.

  2. B

    Rows 4,6 and 7.

  3. C

    Rows 5,6 and 8.

  4. D

    Rows 1,2,3 and 4.

Show answer

Correct answer

  • C

    Rows 5,6 and 8.