Machine-translated by Google. Questions are authored in English.
Top

Test Case Design Techniques Questions and Answers

Answer: B

Cyclomatic complexity measures the number of independent logical paths in a program.

Thomas McCabe's metric is computed from the program's control flow graph as \(V(G) = E - N + 2\), where E is the number of edges and N the number of nodes, or simply as the number of decision points plus one. It gives the number of linearly independent paths, and so the minimum number of test cases needed to cover every branch.

It says nothing about the number of lines of code (that is the LOC measure), memory use or execution time.

Please log in or register to report this question.

12.

Which of the following is the method of black box testing ?

Exam Year(s)

Tripura Public Service Commission - 2026,

Answer: A

The black box method is Boundary value analysis.

Black box testing designs tests from the specification without looking at the code. Boundary value analysis does this by testing at and just around the edges of input ranges (for a valid range of 1 to 100: 0, 1, 2, 99, 100 and 101), where errors are most common.

Basis path testing and code path testing derive tests from the program's control flow, so they are white box methods. As boundary value analysis fits, 'None of these' is wrong.

Please log in or register to report this question.

13.

Basis path testing falls under

Exam Year(s)

UGC NET - 2012,

Answer: B

Basis path testing belongs to white box testing. It uses the control flow graph of the code, computes the cyclomatic complexity, and designs test cases to execute each independent path of the program, so the tester must know the internal structure.

Black box testing looks only at inputs and outputs, system testing is done on the whole system, and unit testing is a level of testing and is not the same as a technique. The basis path method is a white box technique, usually used at the unit level.

Please log in or register to report this question.

Answer: B

For a flow graph, cyclomatic complexity is V(G) = E - N + 2, with E the number of edges and N the number of nodes. It is also P + 1, with P the number of predicate nodes, and it equals the number of regions of the graph. So statements (A), (C) and (D) are correct. Statement (B) gives V(G) = N - E + 2, with the terms reversed, which would be negative for most graphs, so it is the incorrect statement. The answer is option (B).

Please log in or register to report this question.

15.

Consider the following pseudo-code :

If (A > B) and (C > D) then
    A = A + 1
    B = B + 1
Endif

The cyclomatic complexity of the pseudo-code is

Exam Year(s)

UGC NET - 2012,

Answer: B

The cyclomatic complexity of a piece of code is the number of decisions plus one. The pseudo-code has a single if statement whose condition is made of two simple conditions joined by 'and', and each simple condition counts as a decision, so there are two predicates and the complexity is 2 + 1 = 3, option (B). Counting only the whole if as one decision would give 2, and the larger values count decisions that are not there.

Please log in or register to report this question.

Loading…

Other Subjects

Tags: Test Case Design Techniques Questions and Answers || Test Case Design Techniques MCQ Questions and Answers || Test Case Design Techniques GK Questions and Answers || Test Case Design Techniques GK MCQ Questions || Test Case Design Techniques Multiple Choice Questions and Answers || Test Case Design Techniques GK || GK on Test Case Design Techniques || Software Engineering Questions and Answers || Software Engineering MCQ Questions and Answers || Software Engineering GK Questions and Answers || GK on Software Engineering