Language:EN
Pages: 4
Words: 636
Rating : ⭐⭐⭐⭐⭐
Price: $10.99
Page 1 Preview
branch coverage and maximum set independent paths

Test Case Coverage Analysis Assignment Answers

Your question:

student submitted image, transcription available below

student submitted image, transcription available below

Assignment Help Answers with Step-by-Step Explanation:

THEN

C = A - B

IF C = D

Then Print "Error"

To achieve full branch coverage, you need to cover both the true and false branches for each decision point (if statement). In this code, there's one decision point at `IF A > B`. You would need a minimum of 2 test cases to cover both branches (true and false).

4. Full Path Coverage:

5. Cyclomatic Complexity Matrix:

The cyclomatic complexity of a program can be calculated using the formula:

- E is the number of edges in the flow graph.

- N is the number of nodes in the flow graph.

The basis set of independent paths represents a set of linearly independent paths through the code. To determine this, you can list the paths, ensuring that no path in the set is a linear combination of others. For this code, the basis set of independent paths includes the following two paths:

- Path 1: A > B (True) -> C = A - B -> Read D -> C = D (False)

- Test Case 2: Set A > B to false, and make sure C != D.

These test cases should cover all the paths and ensure you achieve full path coverage, as well as coverage for the basis set of independent paths.

You are viewing 1/3rd of the document.Purchase the document to get full access instantly

Immediately available after payment
Both online and downloadable
No strings attached
How It Works
Login account
Login Your Account
Place in cart
Add to Cart
send in the money
Make payment
Document download
Download File
img

Uploaded by : Hector Lee

PageId: DOCD642595