MauryaHub PYQ Practice

cs3002_2024T1_Q1_NA.pdf

Software Testing · Quiz 1 · Jan 2024

← Course papers · Start practice / exam

This page contains the reliably extracted subset, not the complete original paper.

Questions and published explanations below are available without starting a test. Some questions may not have a published solution yet.

Question 2 MCQ · 5.0 marks

Which of the following approaches to integration testing does not require scaffolding?
  1. Top-down
  2. Bottom-up
  3. Sandwich
  4. Big bang

A published solution is not available for this question yet.

Question 3 MCQ · 5.0 marks

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. Level 0
  2. Level 1
  3. Level 2
  4. Level 3

A published solution is not available for this question yet.

Question 4 MCQ · 5.0 marks

Match the following based on different levels of testing. [[IMAGE:472a03c9d3ace48c_4_0]]
Source diagram or notation
  1. A-4, B-1, C-3, D-2
  2. A-4, B-3, C-2, D-1
  3. A-2, B-1, C-3, D-4
  4. A-2, B-3, C-4, D-1

A published solution is not available for this question yet.

Question 5 MCQ · 6.0 marks

Consider the control flow graph (CFG) below. [[IMAGE:472a03c9d3ace48c_5_1]] From the following code segments identify the one that is best presented by the given CFG.
Source diagram or notation
  1. [[IMAGE:472a03c9d3ace48c_5_2]]
    Source diagram or notation
  2. [[IMAGE:472a03c9d3ace48c_5_3]]
    Source diagram or notation
  3. [[IMAGE:472a03c9d3ace48c_6_4]]
    Source diagram or notation
  4. [[IMAGE:472a03c9d3ace48c_6_5]]
    Source diagram or notation

A published solution is not available for this question yet.

Question 6 MCQ · 6.0 marks

Consider the code below. [[IMAGE:472a03c9d3ace48c_7_6]] Identify the appropriate condition such that the execution will reach the error statement in LINE-1.
Source diagram or notation
  1. (x < y) && (x > 5) && (y < 0)
  2. (x < y) && (x < 5) && (y <= 0)
  3. (x < y) && (x < 4) && (y < 1)
  4. (x < y) && (x < 4) && (y <= 1)

A published solution is not available for this question yet.

Question 7 MCQ · 6.0 marks

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. [1, 2, 4]
  2. [1, 2, 3, 2, 4]
  3. [1, 2, 3, 4]
  4. [1, 2, 4, 2, 4]

A published solution is not available for this question yet.

Question 8 MCQ · 6.0 marks

Consider the following classes for the code base to be tested and the test class. [[IMAGE:472a03c9d3ace48c_8_7]] [[IMAGE:472a03c9d3ace48c_9_8]] Identify the test case method that will fail for the given code base.
Source diagram or notationSource diagram or notation
  1. testcase1()
  2. testcase2()
  3. testcase3()
  4. testcase4()

A published solution is not available for this question yet.

Question 9 MCQ · 6.0 marks

Consider the finite state machine (FSM) as given below. [[IMAGE:472a03c9d3ace48c_10_9]] Identify the statement that correctly describes the given FSM.
Source diagram or notation
  1. It accepts all strings that have odd number of 0s and odd number of 1s.
  2. It accepts all strings that have even number of 0s and even number of 1s.
  3. It accepts all strings that have odd number of 0s and even number of 1s.
  4. It accepts all strings that have even number of 0s and odd number of 1s.

A published solution is not available for this question yet.

Question 10 MSQ · 5.0 marks

Which of the following is/are represented by the nodes in graph models for integration testing?
  1. Modules
  2. Interfaces
  3. Test stubs
  4. Test Drivers

A published solution is not available for this question yet.

Question 11 MSQ · 5.0 marks

Consider the CFG given below. [[IMAGE:472a03c9d3ace48c_11_10]] From the following options, identify all the valid test paths.
Source diagram or notation
  1. [1, 2, 3, 5, 6, 1]
  2. [1, 2, 3, 5, 2, 4, 5, 6]
  3. [1, 2, 3, 5, 2, 3, 5, 6, 1, 2, 3, 5, 6]
  4. [1, 2, 3, 4, 5, 6, 1, 2, 5, 6]

A published solution is not available for this question yet.

Question 12 MSQ · 5.0 marks

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?
  1. Initial and terminal vertices are distinct.
  2. Any one interior vertices should have out-degree as 2.
  3. All the interior vertices have both in-degree and out-degree as 1.
  4. All the interior vertices have both in-degree and out-degree as ≥1.

A published solution is not available for this question yet.

Question 13 MSQ · 5.0 marks

Which of the following statements is/are true?
  1. Prime path coverage subsumes all du-paths coverage.
  2. Edge-pair coverage subsumes prime path coverage.
  3. Node coverage subsumes edge coverage.
  4. Edge-pair coverage subsumes edge coverage.

A published solution is not available for this question yet.

Question 14 MCQ · 6.0 marks

[[IMAGE:472a03c9d3ace48c_13_11]] 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?
Source diagram or notation
  1. It is 1 for both node coverage and edge coverage.
  2. It is 1 for node coverage, and 3 for edge coverage.
  3. It is 3 for both node coverage and edge coverage.
  4. It is 2 for node coverage, and 3 for edge coverage.

A published solution is not available for this question yet.

Question 15 MCQ · 5.0 marks

[[IMAGE:472a03c9d3ace48c_13_11]] Based on the above data, answer the given subquestions.
What is the cyclomatic complexity of the given CFG?
Source diagram or notation
  1. 3
  2. 4
  3. 5
  4. 6

A published solution is not available for this question yet.

Question 16 MCQ · 6.0 marks

Consider the CFG given below. [[IMAGE:472a03c9d3ace48c_15_12]] Based on the above data, answer the given subquestions.
Find the number of test requirements for prime path coverage.
Source diagram or notation
  1. 5
  2. 6
  3. 7
  4. 8

A published solution is not available for this question yet.

Question 17 MCQ · 6.0 marks

Consider the CFG given below. [[IMAGE:472a03c9d3ace48c_15_12]] Based on the above data, answer the given subquestions.
Identify the correct set of test paths for prime path coverage.
Source diagram or notation
  1. {[1, 6], [1, 2, 5, 6], [1, 2, 3, 4, 3, 4, 3, 5, 6]}
  2. {[1, 6], [1, 2, 3, 4, 3, 5, 6]}
  3. {[1, 6], [1, 2, 5, 6], [1, 2, 3, 5, 6], [1, 2, 3, 4, 3, 5, 6]}
  4. {[1, 6], [1, 2, 5, 6], [1, 2, 3, 5, 6], [1, 2, 3, 4, 3, 4, 3, 5, 6]}

A published solution is not available for this question yet.

Question 18 MCQ · 6.0 marks

Consider the annotated control flow graph (CFG) given below. [[IMAGE:472a03c9d3ace48c_16_13]] Based on the above data, answer the given subquestions.
How many du-pairs are there for the variable b?
Source diagram or notation
  1. 4
  2. 6
  3. 8
  4. 12

A published solution is not available for this question yet.

Question 19 MCQ · 6.0 marks

Consider the annotated control flow graph (CFG) given below. [[IMAGE:472a03c9d3ace48c_16_13]] Based on the above data, answer the given subquestions.
How many unique du-paths are there for the variable b?
Source diagram or notation
  1. 4
  2. 5
  3. 6
  4. 7       **AI** **Section Id :** 64065351451 **Section Number :** 2 **Section type :** Online **Mandatory or Optional :** Mandatory **Number of Questions :** 8 **Number of Questions to be attempted :** 8 **Section Marks :** 25 **Display Number Panel :** Yes **Section Negative Marks :** 0 **Group All Questions :** No **Enable Mark as Answered Mark for Review and** Yes **Clear Response :** **Maximum Instruction Time :** 0

A published solution is not available for this question yet.