Software Testing - Tutorial
Software Testing - Tutorial
BY SHAYMAA
What is Software Testing
•“ The process of executing a program or system with the intent of
finding errors ” Glen Myers, 1979
➢ Any evaluation activity that involves the customer can be used for validation purposes.
➢ Includes program reviews, and acceptance testing.
Why Do We Test?
• Make sure the software works as expected.
• We test to try to minimize the risk that our customers would have by
using the system.
Test early and test often
Common Testing terms
• Error: a mistake made by a human (in a software development activity)
• Defect(or fault): the result of introducing an error into a software artifact
• Failure: a departure from the required behavior for a system. A failure occurs
when a fault executes.
• Incident: when a failure occurs, it may or may not be readily apparent to the user.
An incident is the symptom associated with a failure that alerts the user to the
occurrence of a failure..
• Test case: is a set of inputs, expected output, execution conditions, and a pass/fail
criterion.
• Test Plan: Describes scope, approach, resources, test schedule, items to be tested,
deliverables, responsibilities, approvals needed, …etc.
Black Box Vs White Box Testing
Answer:
• Search for a round trip from one city that has one airport to another that has more
than one airport.
• Search for a round trip from one city that has more than one airport to another that
has more than one airport.
• Search for round trip going to a city that does not have an airport
Test Case
Documenting Test case
Different states of a test case results
Example of a test case
Consider the following requirements (Round Trip):
• The system shall allow customer to search for round trip tickets.
Note:
We can write many other test cases for above requirement
The above is not complete testcase
IEEE 829 test plan structure
❑ IEEE 829-2008, also known as the 829 Standard for Software Test
Documentation,
IEEE 829 test plan structure
Testing Types
• There are number of categories of testing that can be accomplished for
software.
• Each category addresses the software from a unique perspective.
• The four basic tests that are accomplished for almost all systems are Unit,
Integration, Validation, and System Testing.
• There are a variety of other tests as well that may be performed as part of, or in
addition to, these four basic tests
Unit Testing
Unit Testing refers to the testing of individual modules to ensure that
they operate correctly independently of other modules.
This is the first level of testing and is normally accomplished
by the developer.
Unit testing is white box testing technique.
Integration Testing
Integration testing ensures that all modules interoperate
properly and can be integrated successfully into a functioning
system.
The development team performs integration testing once unit testing is
complete and prior to validation testing
Validation Testing
Validation testing is black box testing that ensures the customers requirement is met.
The end user or representatives of the end user normally perform validation
testing.
Validation testing is the most important testing phase from the perspective of user
acceptance of the system.
System Testing
❑ Ensures that the software will operate properly within the overall target
environment, including other existing systems.
Acceptance Testing
Acceptance Testing is a formal approach to validation testing where the test becomes the
official basis for user acceptance of the completed software.
It is commonly used when a formal contract is in place for the development of software.
Once the customer signs off on the acceptance test, they are certifying that the
contract is complete.
Alpha Vs Beta Testing
Alpha Testing Is a type of software testing performed to identify bugs
before releasing the product to real users or to the public. (White &
Black box)
Beta Testing Is performed by real users of the software application in
a real environment. (Black Box)
Test Case Template
Task (Individual)
ATM
• A customer must be able to access his account using any ATM machine, valid card and correct pin code
• A customer must be able to Change Pin-Code
• A customer must be able to Check balance
• A customer must be able to Withdraw
• A customer must be able to Print balance report
• A customer must be able to abort a transaction in progress by pressing the Exit key instead of
responding to a request from the machine.
• A customer must be able to make a deposit to any account linked to the card
• A customer must be able to make a transfer of money between any two accounts linked to the card.