0% found this document useful (0 votes)
65 views4 pages

Lab Assignment 4

The document describes a test case report for a program that classifies triangles as scalene, isosceles, or equilateral based on side lengths. It includes 13 test cases covering valid and invalid inputs such as valid scalene, equilateral, and isosceles triangles; invalid side lengths; non-integer values; and incorrect number of inputs. The test cases were executed and the program output matched the expected output for each case, validating the program.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views4 pages

Lab Assignment 4

The document describes a test case report for a program that classifies triangles as scalene, isosceles, or equilateral based on side lengths. It includes 13 test cases covering valid and invalid inputs such as valid scalene, equilateral, and isosceles triangles; invalid side lengths; non-integer values; and incorrect number of inputs. The test cases were executed and the program output matched the expected output for each case, validating the program.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Vaishnavi G

MCA II Semester - Software Testing


Registration Number: EA2132251010004

Lab Assignment 4 :

Preparation of Test Case Report on Triangle Program

AIM:

To derive the test cases for a program that reads three integer values from an input
dialog. The three values represent the length of the sides of the triangle. The program displays a
message that states whether the triangle is scalene, isosceles or equilateral.

Test case specifications:

1. A test case that represent valid scalene triangle.

2. A test case to represent a valid equilateral triangle.

3. A test case that represents a valid isosceles triangle.

4. A test case with three integers greater than zero such that sum of two integers should
be less than the third integer.

5. A test case in which one side has a zero value.

6. A test case in which one side has a negative value.

7. A test case with three integers greater than zero such that sum of two is equal to third.

8. Test cases for all three permutations where the length of one side is equal to the sum of
the lengths of other two sides.

9. A test case with all sides zero.

10. A test case with non-integer values.

11. A test case that specifies wrong number of values (3,2).


Vaishnavi G
MCA II Semester - Software Testing
Registration Number: EA2132251010004

Test Case Report

Serial Input Data Type Of Expected Output Actual Output Result


No Test
1. (3,4,5) Valid Scalene Triangle Scalene Triangle Pass
2. (3,3,3) Valid Equilateral Triangle Equilateral Triangle Pass
3. (5,5,8) Valid Isosceles Triangle Isosceles Triangle Pass
4. (2,1,4) Invalid Invalid Triangle Invalid Triangle Pass
5. (0,1,9) Invalid Invalid Triangle Invalid Triangle Pass
6. (5,5,-5) Invalid Invalid Triangle Invalid Triangle Pass
7. (1,2,3) Invalid Invalid Triangle Invalid Triangle Pass
8(a) (2,3,5) Invalid Invalid Triangle Invalid Triangle Pass
(b) (3,2,5) Invalid Invalid Triangle Invalid Triangle Pass
(c) (5,2,3) Invalid Invalid Triangle Invalid Triangle Pass
9. (0,0,0) Invalid Invalid Triangle Invalid Triangle Pass
10. (3.2,4.5,3.8) Valid Scalene Triangle Scalene Triangle Pass
11. (3,2) Invalid Invalid Triangle Invalid Triangle Pass
12 (5,a,@) Invalid Invalid Triangle Invalid Triangle Pass
13 (1,2,3,6) Invalid Invalid Triangle Invalid Triangle Pass
Vaishnavi G
MCA II Semester - Software Testing
Registration Number: EA2132251010004

PROGRAM

#include<stdio.
h>
#include<conio
.h> void main()
{
float a,b,c;
float
k=0,l,m;
clrscr();
printf("Enter the value of a b c\
n"); scanf("%f%f%f",&a,&b,&c);
k=a+b;
l=b+
c;
m=c
+a;
if((k>c) && (l>a) && (m>b)) {

if(a>0 && b>0 && c>0) {


if((a==b || b==c || c==a) && (a!=b || b!=c || c!=a))
{
printf("Isosceles Triangle\n");
}
else if( (a!=b) && (b!=c) && (c!=a))
{
printf("Scalene Triangle\n");
}
else if((a==b) && (b==c) && (c==a)) { printf("Equilateral Triangle\n");

}
else
}}

{
printf("invalid triangle");
}

getch();
}

RESULT:

Thus the test cases for triangle program are successfully executed.
Vaishnavi G
MCA II Semester - Software Testing
Registration Number: EA2132251010004

You might also like