0% found this document useful (0 votes)
14 views8 pages

B Tech It

The document describes an experiment to test a triangle using boundary value analysis and equivalence class partitioning. It provides the program code to test what type of triangle it is or if it is a triangle. It then shows the test case tables for boundary value analysis with 13 test cases and equivalence class partitioning with 13 test cases. The tables provide the input data, expected and actual outcomes, and status of each test case.

Uploaded by

kismatgill1
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)
14 views8 pages

B Tech It

The document describes an experiment to test a triangle using boundary value analysis and equivalence class partitioning. It provides the program code to test what type of triangle it is or if it is a triangle. It then shows the test case tables for boundary value analysis with 13 test cases and equivalence class partitioning with 13 test cases. The tables provide the input data, expected and actual outcomes, and status of each test case.

Uploaded by

kismatgill1
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/ 8

Experiment-5

Name: Bhagwat dev sharma


Course: B.Tech(IT)
Enrol No: A20405321002

Batch: 2021 - 2025


Section: A2 Lab

AIM : To test a triangle using Boundary-Value Analysis and Equivalence Class Partition
technique.

Program to test triangle type and whether it is a triangle or not:-

#include<conio.h>

#include<stdio.h> void main()

{ int a,b,c,result; printf(" Enter the values of a, b

and c : = "); scanf("%d %d %d",

&a,&b,&c); if (a<= 0 || b <= 0 || c <= 0) { printf("Invalid input: Sides of a

triangle must be positive integers.\n");

if(((a+b)>c)&&((b+c)>a)&&((c+a)>b))

if((a==b)&&(b==c)) printf("\n It is an

Equilatral Triangle"); else if((a==b)||

(b==c)||(c==a)) printf("\n It is an isosceles


Triangle"); else printf("\n It is a Scalene

Triangle"); }else printf("\n It is not a

triangle"); getch();

Test Case Table For Boundary Value Analysis:-

In Boundary Value Analysis, 4N+1 test cases will be generated, which means, in this case,
4*3+1= 13 test cases. We are Supposing interval [10 90].

BOUNDARY VALUE TEST CASES

Invalid Test Case (Min Valid Test Case (Min, +Min, Invalid Test Case (Max
Value-1) Max, -Max) Value +1)

9 10, 11, 90, 89 91

Test Case Table :-

Input Data

Test Id A B C Actual Outcome Status

Expected
Outcome
1. 9 10 11 Scalene Triangle Scalene Triangle Pass

2. 9 10 91 Not a Triangle Not a Triangle Pass

3. 9 11 90 Not a Triangle Not a Triangle Pass

4. 9 90 91 Scalene Triangle Scalene Triangle Pass


5. 9 9 10 Isosceles Triangle Isosceles Triangle Pass

6. 10 11 91 Not a Triangle Not a Triangle Pass

7. 10 90 91 Scalene Triangle Scalene Triangle Pass

8. 11 89 90 Scalene Triangle Scalene Triangle Pass

9. 11 89 91 Scalene Triangle Scalene Triangle Pass


10. 11 90 91 Scalene Triangle Scalene Triangle Pass

12. 89 90 91 Scalene Triangle Scalene Triangle Pass

13. 10 10 10 Pass

Equilateral Equilateral
Triangle Triangle

Equivalence Class Partition Test Case Table:- We


are Supposing interval [10 90].

Input Data
Test Id A B C Actual Outcome Status

Expected
Outcome

1. 10 10 10
Pass

Equilateral
Triangle Equilateral Triangle

2. 20 20 20
Pass

Equilateral
Triangle Equilateral Triangle

3. 10 20 30 Not a Triangle Not a Triangle Pass


4. 30 40 50 Scalene Triangle Scalene Triangle Pass

5. 60 80 90 Scalene Triangle Scalene Triangle Pass

6. 10 10 20 Not a Triangle Not a Triangle Pass

7. 20 30 30 Isosceles Triangle Isosceles Triangle Pass

8. 30 40 30 Isosceles Triangle Isosceles Triangle Pass


9. 10 10 21 Not a Triangle Not a Triangle Pass

10. 10 20 5 Not a Triangle Not a Triangle Pass

11. 90 90 90
Pass

Equilateral
Triangle Equilateral Triangle

12. 10 90 10 Not a Triangle Not a Triangle Pass

13. 10 90 89 Scalene Triangle Scalene Triangle Pass

You might also like