Ch8.Testing (2)-١
Ch8.Testing (2)-١
Validation testing
To demonstrate to the developer and the system customer that
the software meets its requirements
A successful test shows that the system operates as intended.
Defect testing
To discover faults or defects in the software where its
behaviour is incorrect or not in conformance with its specification
A successful test is a test that makes the system perform
incorrectly and so exposes a defect in the system.
Dynamic Testing:
The first error (i <= numbers.length) will cause
an ArrayIndexOutOfBoundsException.This error masks the second
error (division by zero), as the second error is never reached during
testing if the first error halts the program.
Static Inspection:
both errors can be identified independently. Since no execution occurs,
errors do not interact, allowing all issues to be detected without one
hiding the other.
Chapter 8 Software Testing 12
Inspections and testing
A setup part, where you initialize the system with the test
case, namely the inputs and expected outputs.
A call part, where you call the object or method to be
tested.
An assertion part where you compare the result of the
call with the expected result. If the assertion evaluates to
true, the test has been successful, if false, then it has
failed.
George is a nurse who specializes in mental healthcare. One of his responsibilities is to visit patients
at home to check that their treatment is effective and that they are not suffering from medication
side effects.
On a day for home visits, George logs into the Mentcare system and uses it to print his schedule of
home visits for that day, along with summary information about the patients to be visited. He
requests that the records for these patients be downloaded to his laptop. He is prompted for his key
phrase to encrypt the records on the laptop.
One of the patients that he visits is Jim, who is being treated with medication for depression. Jim
feels that the medication is helping him but believes that it has the side effect of keeping him awake
at night. George looks up Jim’s record and is prompted for his key phrase to decrypt the record. He
checks the drug prescribed and queries its side effects. Sleeplessness is a known side effect so he
notes the problem in Jim’s record and suggests that he visits the clinic to have his medication
changed. Jim agrees so George enters a prompt to call him when he gets back to the clinic to make
an appointment with a physician. George ends the consultation and the system re-encrypts Jim’s
record.
After, finishing his consultations, George returns to the clinic and uploads the records of patients
visited to the database. The system generates a call list for George of those patients who He has to
contact for follow-up information and make clinic appointments.
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.