After the units are integrated, the whole product must be checked against the requirements, and any errors found must be traced to their cause and fixed.

Validation Testing

Validation testing begins when integration is complete. It checks that the software works in the way that the customer can reasonably expect, as stated in the requirements. A validation test plan lists the tests, and each requirement is traced to at least one test. Two further tests are done. In alpha testing the customer uses the software at the developer's site while the developer watches, and records problems. In beta testing the software is used by real users at their own sites without the developer present, and they report the problems.

Definition: Validation testing. Testing to confirm that the complete software meets the customer's requirements and works as the customer reasonably expects.

System Testing

System testing checks the software as part of the whole computer-based system, with its hardware, people and other software. Its types include recovery testing, which forces a failure and checks that the system recovers, security testing, which checks protection against improper access, stress testing, which runs the system with abnormal load, and performance testing, which measures speed and resource use at run time. Deployment testing checks the software in every environment where it will run.

The Art of Debugging

Debugging is the process that follows a successful test. It begins with an error and ends with finding its cause and removing it. The steps are to run the test, find the symptom, locate the cause, fix it, and then repeat the test. The approaches are brute force, which uses memory dumps and print statements, backtracking, which traces from the symptom back through the code, and cause elimination, which lists possible causes and tests each one. A debugger tool allows the program to be paused at breakpoints and its variables to be viewed.

Table 3.7: Types of system testing

Test Purpose Example
Recovery Check recovery from failure Switch off power during work
Security Check protection Try improper access
Stress Check behaviour under extreme load Thousands of users together
Performance Measure speed Response time of a page

Example 3.7: Choosing the type of test

Problem: An exam portal must remain usable when 2000 students log in at once. Which system test checks this, and what should be measured?

Solution:

  1. The load is abnormal, so stress testing is used.
  2. Performance testing under the same load measures the response time and failures.

Result: Stress testing together with performance testing, measuring response time and error rate.

Common mistakes

  • Fixing the symptom rather than the cause of an error.
  • Making a correction and not rerunning the test.
  • Confusing alpha testing at the developer's site with beta testing at the user's site.

Key takeaways

  • Validation testing checks that the software meets the customer's expectations.
  • Alpha testing is at the developer's site and beta testing is at the user's site.
  • System tests include recovery, security, stress and performance tests.
  • Debugging finds and removes the cause of an error found by testing.

Practice questions

  1. Distinguish alpha and beta testing.
  2. What is stress testing?
  3. What is debugging?

Answers to the practice questions

  1. Alpha is done at the developer's site with the developer present, beta at the users' sites without the developer.
  2. Testing the system under abnormal load or conditions.
  3. Finding and removing the cause of an error that testing has revealed.

Sources

  • Official BCA syllabus Software Engineering, course code 26BCA403DS03, Unit III