6 - Software Testing Edited
6 - Software Testing Edited
Software Testing
DUAL PURPOSE
Verification:
"Are we building the product right?”
The software should conform to its specification.
Validation:
"Are we building the right product?”
The software should do what the user really requires.
EXAMPLE
1. Implement Math function “Square Root”.
2. Function returns -1 for negative input.
3. Function rounds to nearest integer.
int sqrt_fnc(int number);
Test program:
…
test_sqrt_fnc();
…
2/19/2024 Software testing 8
Stages of Testing
…Development Testing
…… Unit testing
test_sqrt_fnc()
{
if (sqrt_fnc(0) != 0)
printf(“sqrt_fnc FAILED!\n”);
else if (sqrt_fnc(101) != 10)
printf(“sqrt_fnc FAILED!\n”);
else if (sqrt_fnc(-100) != -1)
printf(“sqrt_fnc FAILED!\n”);
else
printf(“sqrt_fnc PASSED!\n”);
}
Alpha testing
Users of the software work with the development team to test the
software at the developer’s site.
Beta testing
A release of the software is made available to users to allow
them to experiment and to raise problems that they discover with
the system developers.
Acceptance testing
Customers test a system to decide whether or not it is ready to
be accepted from the system developers and deployed in the
customer environment. Primarily for custom systems.