CSC 501-Software Testing

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

CSC 501:

SOFTWARE ENGINEERING

SOFTWARE TESTING
What is Software Testing?
• Software testing is a confirmation that software is doing what it
is intended to do.
• It is an investigation to find out the degree in which software
conforms to requirements and specifications.
• It is the process of executing a system in order to identify any
gaps, or missing requirements in contrary to the actual
requirements.
• It is a software quality assurance (SQA) issue because it
scrutinizes software competence about how much they conform
with the specified requirements.

Software Testing by Dr. Caesar Nwandu 2


Software Testing Targets:
1. Error – actual coding mistakes made by developers. E.g., If there is
a difference in output of software and desired output, it is considered as an
error
2. Fault – also known as a bug, is the manifestation of error, which
can cause system to fail
3. Failure – the result of executing a fault. Hence, the system is
unable to perform the desired task.
4. Test Case – Description of data that will test a system and the
expected output
5. Test Suite – a set of related test cases

Software Testing by Dr. Caesar Nwandu 3


Definitions
• Software testing is the execution of software program or
code with the aim of discovering errors therein.

• Software testing is a process of analyzing a software item


to detect the differences between existing and required
conditions (that is, defects/errors/bugs) and to evaluate the
features of the software item (ANSI/IEEE 1059 Standard).

Software Testing by Dr. Caesar Nwandu 4


Software Testing Approaches
1. Functionality testing
2. Implementation testing

• Functionality Testing – testing of software


functionality without considering the actual
implementation. This is referred to as black-box
testing.
• It is carried out to test functionality of the program.
• Here, a program is certified good if the output matches
with the desired results over a set of inputs.
Software Testing by Dr. Caesar Nwandu 5
Software Testing Approaches

• Implementation testing - testing of software


functionality as well as the analysis of the way it is
implemented. This is called white-box testing.
• It is conducted to test program and its
implementation.
• It aims at improving the efficiency or structure of
the program code.

Software Testing by Dr. Caesar Nwandu 6


Verification & Validation
Verification Validation
• ensures that the software system • ensures that the functionalities
meets all the functionality meet the intended behavior of the
• takes place first and is done by system
developers • done after verification by testers
• includes checking for documentation, • It checks the overall product to
code, and other components ensure that it satisfies user needs.
• is an objective process • is a subjective process
• contains static activities such as
collecting reviews, walkthroughs, or • involves dynamic activities such as
inspections subjecting the system to execution
against the requirements
• Are you building the software right?
• Are you building the right software?
Software Testing by Dr. Caesar Nwandu 7
Levels of Software Testing
1. Unit Testing: Confirming that individual program code is free of
error.
2. Integration Testing: Confirming that individual units would
work (connect and interact) properly with one another without
error.
3. System Testing: Confirming that entire compiled software
works well when all components are fully integrated.
4. Acceptance Testing: Is the last phase of testing. End-user
confirms whether software meets specified requirements

Software Testing by Dr. Caesar Nwandu 8


Types of Acceptance Testing
Alpha Testing:
• This is an acceptance testing performed by developers using the
system as if it has been deployed to the user environment. Alpha
testing is meant to discover how the system would react to
inputs and the potential reactions the user may have to some
actions.
• Beta Testing:
• This is an acceptance testing conducted by users in their
production environment. Beta testing expects to point out little
errors that were skipped by developers with hope of having them
corrected before final delivery.
Software Testing by Dr. Caesar Nwandu 9
Test-Driven Development (TDD)
• TDD is a software development method that takes testing very
serious.
• It emphasizes that every code must be tested to ascertain that it
runs correctly before a new line of code is written.
• Its major principle is that if a code fails a test, it must be
rewritten to correct the error before new lines of code are
written.
• Test cases for each functionality are created and tested first. If the
functionality fails the test, the code is modified to pass the test.
• Hence, TDD is also called Test-First Development.
Software Testing by Dr. Caesar Nwandu 10
How does TDD Work?
• TDD has 5 steps:
1. Add a test.
2. Execute all tests and see if any one fails.
3. Make changes and refactor code.
4. Run tests.
5. Repeat.

Software Testing by Dr. Caesar Nwandu 11


Software Testing by Dr. Caesar Nwandu 12
Review Questions
1. Distinguish between functional and implementation testing.
2. With the aid of a diagram, briefly describe how test driven
development works.
3. What is a bug?
4. Compare and contrast alpha and beta testing.
5. Differentiate between verification and validation.

Software Testing by Dr. Caesar Nwandu 13

You might also like