0% found this document useful (0 votes)
157 views

Software Testing

The document discusses various software testing techniques and provides examples of problems to apply them to. It includes problems on triangles, dates, commissions, and input/output. The techniques discussed are boundary value analysis, equivalence class partitioning, decision tables, cause-effect graphs, logic coverage, and basis path testing. Readers are prompted to choose problems and design test cases using the different techniques.

Uploaded by

Enock
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
157 views

Software Testing

The document discusses various software testing techniques and provides examples of problems to apply them to. It includes problems on triangles, dates, commissions, and input/output. The techniques discussed are boundary value analysis, equivalence class partitioning, decision tables, cause-effect graphs, logic coverage, and basis path testing. Readers are prompted to choose problems and design test cases using the different techniques.

Uploaded by

Enock
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

(1) triangle problem

Design and develop a program in a language of your choice to solve the triangle problem defined
as follows: Accept three integers which are supposed to be the three sides of a triangle and
determine if the three values represent an equilateral triangle, isosceles triangle, scalene triangle,
or they do not form a triangle at all. Assume that the upper limit for the size of any side is 10.
Derive test cases for your program based on boundaryvalue analysis, execute the test cases and
discuss the results.

It receive three integers a, b, c as input. If a, b, c satisfy these conditions below:


C1. 1≤a ≤200 C4. a<b+c
C2. 1≤b ≤200 C5. b<a+c
C3. 1≤c ≤200 C6. c<a+b
Four possible outputs:
Not a Triangle
Scalene
Isosceles
Equilateral

(2) Next Date


Design, develop, code and run the program in any suitable language to implement the Next Date
function. Analyze it from the perspective of boundary value testing, derive different test cases,
execute these test cases and discuss the test results.

NextDate Function(1812≤year≤2012)
NextDate is a function has three variables (month, day, and year), for years from 1812 to 2012.
it return the next date which user input. Month, day and year are all integer, and satisfy these
conditions below:
1 ≤ month ≤ 12
1 ≤ day≤ 31
1812 ≤ year ≤ 2012

(3) Commission Problem


Design, develop, code and run the program in any suitable language to solve the commission
problem. Analyze it from the perspective of boundary value testing, derive different test cases,
execute these test cases and discuss the test results.

Lock-Stock-Barrel Commission
Rifle salespersons in the Arizona Territory sold rifle locks, stocks, and barrels made by a gunsmith
in Missouri. Lock = $45.00, stock = $30.00, barrel = $25.00. Each salesperson had to sell at least
one complete rifle per month ($100) .The most one salesperson could sell in a month was 70 locks,
80 stocks, and 90 barrels
Each salesperson sent a telegram to the Missouri company with the total order for each town (s)he
visits 1≤towns visited≤10, per month
Commission: 10% on sales up to $1000, 15% on the next $800, and 20% on any sales in excess of
$1800

(4) Input and Output Problem


The first character of input must be ‘#’ or ‘*’,the second character of input must be number. In this
condition, the document will be modified. If the first character isn’t ‘#’ or ‘*’ then give the
information N. if the second character isn’t number then give the information M.

Experiment 1 -----Boundary Value Analysis

(1) Triangle problem


(2) Next Date
(3) Commission problem

Chose two tasks, design the test cases (including of Boundary value test cases; Robust
boundary value test cases; boundary value test cases of worst case; robust boundary value
test cases of worst case and test your program.

Experiment 2 ----- Equivalence Class Partitioning

(1) Triangle problem


(2) Next Date
(3) Commission problem

Chose two tasks, design the test cases (including of weak normal test cases; weak robust test
cases; strong normal test case, strong robust test cases of worst case and test your program.

Experiment 3 ----- Decision Table

(1) Triangle problem


(2) Next Date
(3) Commission problem
Chose two tasks, design test cases using decision table method and test your program.

Experiment 4 ----- Cause-Effect Graph

(1) Triangle problem


(2) Input and Output Problem

Design test cases using cause-effect graph method and test your program.

Experiment 5 -----Logic Coverage and Basis Path

(1) Logic Coverage (Compulsory)


Analyze it from the perspective of logic coverage, i.e. , statement coverage, branch/decision
coverage, condition coverage, branch/condition coverage and condition combination coverage and
path coverage. Derive different test cases, execute these test cases and discuss the test results.

(2) Basis Paths-(binary search algorithm)


Design, develop, code and run the program in any suitable language to implement the binary
search algorithm. Determine the basis paths and using them derive different test cases, execute
these test cases and discuss the test results.
(3) Basis Paths-(quick sort algorithm)
Design, develop, code and run the program in any suitable language to implement the quick sort
algorithm. Determine the basis paths and using them derive different test cases, execute these test
cases and discuss the test results.

You might also like