cs3002_2023T2_Q1_NA.pdf
Software Testing · Quiz 1 · May 2023
← Course papers · Start practice / exam
Questions and published explanations below are available without starting a test. Some questions may not have a published solution yet.
Question 2 MCQ · 4.0 marks
Consider the control flow graph (CFG) below.
[[IMAGE:a9326a83b38e73ed_2_0]]
What are the minimum numbers of test paths are required for node and edge coverage?

Minimum 1 test path for both node and edge coverage.
Minimum 2 test paths for both node and edge coverage.
Minimum 1 test path for node coverage and 2 test paths for edge coverage.
Minimum 2 test path for node coverage and 3 test paths for edge coverage.
A published solution is not available for this question yet.
Question 3 MCQ · 4.0 marks
Match the following.
[[IMAGE:a9326a83b38e73ed_3_1]]

1-D, 2-A, 3-C, 4-B
1-D, 2-C, 3-A, 4-B
1-B, 2-C, 3-A, 4-D
1-B, 2-A, 3-C, 4-D
A published solution is not available for this question yet.
Question 4 MCQ · 4.0 marks
Consider the CFG given below and answer the subquestions.
[[IMAGE:a9326a83b38e73ed_4_2]]
Find the number of test requirements for edge pair coverage.

9
10
11
12
A published solution is not available for this question yet.
Question 5 MCQ · 6.0 marks
Consider the CFG given below and answer the subquestions.
[[IMAGE:a9326a83b38e73ed_4_2]]
Find the number of simple paths.

13
25
37
42
A published solution is not available for this question yet.
Question 6 MCQ · 8.0 marks
Consider the CFG given below and answer the subquestions.
[[IMAGE:a9326a83b38e73ed_4_2]]
Find the number of prime paths.

12
13
14
15
A published solution is not available for this question yet.
Question 7 MCQ · 8.0 marks
[[IMAGE:a9326a83b38e73ed_6_3]]

1-B, 2-A, 3-C
1-B, 2-C, 3-A
1-C, 2-B, 3-A
1-C, 2-A, 3-B
A published solution is not available for this question yet.
Question 8 MCQ · 8.0 marks
Consider the following control flow graph (CFG).
[[IMAGE:a9326a83b38e73ed_7_4]]
From the following code segments identify the one that is best presented by the given CFG.

[[IMAGE:a9326a83b38e73ed_7_5]]

[[IMAGE:a9326a83b38e73ed_7_6]]

[[IMAGE:a9326a83b38e73ed_8_7]]

[[IMAGE:a9326a83b38e73ed_8_8]]

A published solution is not available for this question yet.
Question 9 MSQ · 8.0 marks
[[IMAGE:a9326a83b38e73ed_9_9]]

[[IMAGE:a9326a83b38e73ed_9_10]]

[[IMAGE:a9326a83b38e73ed_9_11]]

[[IMAGE:a9326a83b38e73ed_10_12]]

[[IMAGE:a9326a83b38e73ed_10_13]]

[[IMAGE:a9326a83b38e73ed_10_14]]

A published solution is not available for this question yet.
Question 10 MCQ · 6.0 marks
Consider the finite state machine (FSM) as given below.
[[IMAGE:a9326a83b38e73ed_10_15]]
Identify the statement that correctly describes the given FSM.

It accepts all strings that have odd number of 0s and odd number of 1s.
It accepts all strings that have even number of 0s and even number of 1s.
It accepts all strings that have odd number of 0s and even number of 1s.
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 11 MCQ · 6.0 marks
[[IMAGE:a9326a83b38e73ed_12_16]]

testcase1()
testcase2()
testcase3()
testcase4()
A published solution is not available for this question yet.
Question 12 MCQ · 6.0 marks
Consider the CFG given below.
[[IMAGE:a9326a83b38e73ed_13_17]]
Identify the number of linearly independent paths.

3
4
5
6
A published solution is not available for this question yet.
Question 13 MCQ · 6.0 marks
[[IMAGE:a9326a83b38e73ed_14_18]]

[[IMAGE:a9326a83b38e73ed_14_19]]

[[IMAGE:a9326a83b38e73ed_14_20]]

[[IMAGE:a9326a83b38e73ed_14_21]]

[[IMAGE:a9326a83b38e73ed_14_22]]

A published solution is not available for this question yet.
Question 14 MSQ · 6.0 marks
Identify the statement(s) that are true about graph coverage criteria.
Node coverage subsumes both edge coverage and edge pair coverage.
Prime path coverage subsumes both edge Coverage and all duPaths Coverage.
All duPaths Coverage subsumes both all uses coverage and all defs coverage.
Edge pair coverage subsumes both all uses coverage and all defs coverage.
A published solution is not available for this question yet.
Question 15 MCQ · 6.0 marks
Consider the annotated CFG given below and answer the subquestions.
[[IMAGE:a9326a83b38e73ed_16_23]]
How many du-pairs are there for the variable z?

8
9
10
11
A published solution is not available for this question yet.
Question 16 MCQ · 6.0 marks
Consider the annotated CFG given below and answer the subquestions.
[[IMAGE:a9326a83b38e73ed_16_23]]
How many unique du-paths are there for the variable z?

4
5
6
7
A published solution is not available for this question yet.
Question 17 MSQ · 4.0 marks
Which of the following integration testing techniques may use scaffolding?
Top-down
Bottom-up
Sandwich
Big bang
A published solution is not available for this question yet.
Question 18 MSQ · 4.0 marks
Consider the annotated CFG given below.
[[IMAGE:a9326a83b38e73ed_18_24]]
Identify the test case input(s) that test the path [s, v, x, y, z].

{a = 10, b = 20, c = 15}
{a = 10, b = 20, c = 30}
{a = 30, b = 20, c = 30}
{a = 30, b = 30, c = 30}
**AI**
**Section Id :** 64065339126
**Section Number :** 2
**Section type :** Online
**Mandatory or Optional :** Mandatory
**Number of Questions :** 5
**Number of Questions to be attempted :** 5
**Section Marks :** 25
**Display Number Panel :** Yes
**Group All Questions :** No
A published solution is not available for this question yet.