Open In App

Robustness Analysis – Quadratic Equation Problem

Last Updated : 24 Jan, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

Robustness Testing is the extended version of Boundary value analysis. It is a Black Box software testing technique. It does not examine the internal structure or design of the system. 

Boundaries are a very good place for errors to occur. If we design software and generate test cases, the value within a specified range has less probability for errors to occur. The values just below and above the boundary or at the boundary have a higher chance to generate an error.

Assuming the interval [x, y]

1. Values between x and y: Less chance to generate error.
2. x – 1, x, x + 1, y – 1, y, y + 1: More chance to generate error.

Single Fault Assumption

When we check more than one variable for the same software then single fault assumption can be used. Holding all but one variable to extreme values one by one. 

Total Number of Test Cases for ‘n’ variables: (6n+1) test cases.

In designing the test cases for robustness testing, we have to determine the total number of input variables. For each input variable, we determine the extreme values and nominal values.

Example: Consider a program for the determination of the nature of the roots of a Quadratic Equation. Its input is triple of a positive integer and the values range from 0 to 100.

Expected Outputs:

Not a quadratic equation: a = 0

Real roots: (b2 − 4ac) > 0

Imaginary roots: (b2−4ac) < 0

Equal roots: (b2−4ac) = 0

Solution:

The range according to the problem statement:

0 ≤ a ≤ 100
0 ≤ b ≤ 100
0 ≤ c ≤ 100

The nominal value can be taken as = (0 + 100) / 2
                                                       = 50.

Total number of test cases = 6 * n + 1
                                         = 6 * 3 + 1
                                         = 19 test cases 

The table below shows the test case design for the quadratic equation problem. The range is taken as [0, 100] and the nominal value is taken as 50.

Test Case ID a b c Expected Output
T1 -1 50 50 Real Roots
T2 0 50 50 Not a quadratic equation
T3 1 50 50 Real Roots
T4 50 50 50 Imaginary Roots
T5 99 50 50 Imaginary Roots
T6 100 50 50 Imaginary Roots
T7 101 50 50 Imaginary Roots
T8 50 -1 50 Imaginary Roots
T9 50 0 50 Imaginary Roots
T10 50 1 50 Imaginary Roots
T11 50 99 50 Imaginary Roots
T12 50 100 50 Equal Roots
T13 50 101 50 Imaginary Roots
T14 50 50 -1 Real Roots
T15 50 50 0 Real Roots
T16 50 50 1 Real Roots
T17 50 50 99 Imaginary Roots
T18 50 50 100 Imaginary Roots
T19 50 50 101 Imaginary Roots

Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads