Activity # 1: Software Testing: Introduction Testing Methods Levels of Testing

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 26

Activity # 1 : Software Testing

Introduction
Testing methods
Levels of Testing
Learning outcomes

• When you read this activity, you will:


– Explains what software testing is
– Describe different types of software testing
– Describe methods / techniques of software testing
– Explain importance of testing

Compiled By:Desalegn A. BiT, Software Testing 2


Introduction
• Testing is a critical element of software development life cycles
• Software testing called software quality control or software
quality assurance
– basic goals: validation and verification
• validation: are we building the right product?
– does “X” do what the user really requires.
• verification: Are we building the product right?
– does “X” meet its specification?
• where “X” can be code, a model, a design diagram, a
requirement, …
• At each stage, we need to verify that the thing we produce
accurately represents its specification
Compiled By:Desalegn A. BiT, Software Testing 3
Cont’d
• Software testing is a process used to identify the correctness,
completeness and quality of developed computer software
• It is the process of executing program/application under positive and
negative conditions by manual or automated means.
• It checks for the:-
• Specification
• Functionality
• performance
• Why testing
oUncover as many as errors (or bugs) as possible in a given product.
o Demonstrate a given software product matching its requirement
specifications.
oValidate the quality of a software testing using the minimum cost and efforts.
o Generate high quality test cases, perform effective tests, and issue correct
and helpful problem reports.
Compiled By:Desalegn A. BiT, Software Testing 4
Terminology
• An error is a mistake made by an engineer
– often a misunderstanding of a requirement or design specification
• A fault is a manifestation of that error in the code
– what we often call “a bug”
• A failure is an incorrect output/behavior that is caused by executing a fault
– The failure may occur immediately (crash!) or much, much later in the
execution
• Validation: Activity of checking for deviations between the observed
behavior of a system and its specification.
• Testing attempts to surface failures in our software systems
– Debugging attempts to associate failures with faults so they can be
removed from the system
• If a system passes all of its tests, is it free of all faults?

Compiled By:Desalegn A. BiT, Software Testing 5


What is Testing
• Software testing is a process of executing a program or application
with the intent of finding the software bugs.
• It can also be stated as the process of validating and verifying that
a software program or application or product meets the business
and technical requirements that guided it's design and
development.
• Testing is intended to show that a program does what it is intended
to do and to discover program defects before it is put into use.
• When you test software, you execute a program using artificial
data.
• You check the results of the test run for errors, anomalies or
information about the program’s non-functional attributes.
• Can reveal the presence of errors NOT their absence.
Compiled By:Desalegn A. BiT, Software Testing 6
Cont’d
• Executing software in a simulated or real environment, using
inputs selected somehow.
• Testing is a process of identifying defects
• In order to test a software, develop test cases and test data
– A test case is a formal description of
• A starting state
• One or more events to which the software must
respond
• The expected response or ending state
– Test data is a set of starting states and events used to test a
module, group of modules, or entire system

Compiled By:Desalegn A. BiT, Software Testing 7


Goals of S/w Testing
• Executing a program with the intent of finding an error.
• To check if the system meets the requirements and be
executed successfully in the Intended environment.
• To check if the system is “ Fit for purpose”.
• To check if the system does what it is expected to do.
• A good test case is one that has a probability of finding an, as
yet undiscovered, error.
• A successful test is one that uncovers a yet undiscovered error.
• A good test is not redundant.
• A good test should be “best of breed”.
• A good test should neither be too simple nor too complex.

Compiled By:Desalegn A. BiT, Software Testing 8


Test Methods

• Black box testing


• White box testing
• Incremental testing

Compiled By:Desalegn A. BiT, Software Testing 9


Cont’d
• Black box testing
– No knowledge of internal design or code required.
– Tests are based on requirements and functionality
• White box testing
– Knowledge of the internal program design and code required.
– Tests are based on coverage of code statements, branches, paths, conditions
• Incremental Testing
– A disciplined method of testing the interfaces between unit-tested programs as
well as between system components.
– Involves adding unit-testing program module or component one by one, and
testing each result and combination.
– Two types
• Top-down – testing form the top of the module hierarchy and work down to the
bottom. Modules are added in descending hierarchical order.
• Bottom-up – testing from the bottom of the hierarchy and works up to the top.
Modules are added in ascending hierarchical order.
Compiled By:Desalegn A. BiT, Software Testing 10
Levels of Software Testing
• There are four types of software Testing. These are:
Single module
testing
1. Unit Testing
Subcomponent testing
2. Integration Testing
Whole system FR testing

3. System testing

4. Acceptance Testing
User needs satisfaction

Compiled By:Desalegn A. BiT, Software Testing 11


I) Unit Testing

• Unit testing is the process of testing individual


components in isolation.
• It is a defect testing process.
• Units may be:
– Individual functions or methods within an object
– Object classes with several attributes and methods
– Composite components with defined interfaces used to
access their functionality.

Compiled By:Desalegn A. BiT, Software Testing 12


• The most ‘micro’ scale of testing.
• Tests done on particular functions or code
• Output:
modules.
– Unit Test Report
• Requires knowledge of the internal program
• Who
design and code.
– Developer
• Done by Programmers (not by testers).
• Methods
• Objectives
– White Box testing techniques
– To test the function of a program or unit of code
such as a program or module – Test Coverage techniques
– To test internal logic • Tools
– To verify internal design – Debug
– To test path & conditions coverage – Re-structure
– To test exception conditions & error handling – Code Analyzers
• When: After modules are coded – Path/statement coverage tools
• Input • Education
– Internal Application Design – Testing Methodology
– Master Test Plan – Effective use of tools
– Unit Test Plan
Compiled By:Desalegn A. BiT, Software Testing 13
2) Integration Testing
• This phase involves testing of modules which have been
integrated in sub-system.
• On a very large system it is often wise to do integration testing
in several steps.
• Such systems generally have several relatively large
components that can be built and integrated separately
before combination into a full system.
• The components can be:
– code modules
– individual applications
– client/server applications on a network
– Etc….

Compiled By:Desalegn A. BiT, Software Testing 14


Objectives  To technically verify proper interfacing between
modules, and within sub-systems
When  After modules are unit tested

Input  Internal & External Application Design


 Master Test Plan
 Integration Test Plan
Output  Integration Test report
Who Developers

Methods White and Black Box techniques


Problem / Configuration Management

Tools Debug
Re-structure
Code Analyzers

Education Testing Methodology


Effective use of tools

Compiled By:Desalegn A. BiT, Software Testing 15


Why integration testing

• One module can have an adverse effect on another


• Sub-functions, when combined, may not produce the desired
major function
• Individually acceptable imprecision in calculations may be
magnified to unacceptable levels
• Interfacing errors not detected in unit testing may appear
• Timing problems (in real-time systems) are not detectable by
unit testing
• Resource contention problems are not detectable by unit
testing

Compiled By:Desalegn A. BiT, Software Testing 16


Integration Testing Problems

Potential Problems:
• Inadequate unit testing.
• Inadequate planning & organization for integration
testing.
• Inadequate documentation and testing of externally-
supplied components.

Compiled By:Desalegn A. BiT, Software Testing 17


3) System Testing
• Objectives
– To verify that the system components perform their functions
– To perform inter-system test
– To demonstrate that the system performs both functionally and
operationally as specified
– To perform appropriate types of tests relating to Transaction Flow,
Installation, Reliability, Regression etc.
• When
– After Integration Testing
• Input
– Detailed Requirements & External Application Design
– Master Test Plan
– System Test Plan
• Output
– System Test Report
Compiled By:Desalegn A. BiT, Software Testing 18
Cont’d
• Who
– Development Team and Users
• Methods
– Problem / Configuration Management
• Tools
– Recommended set of tools
• Education
– Testing Methodology
– Effective use of tools
• Can be either of the following two:
– Alpha testing
• Testing done when development is nearing completion
• Minor design changes may still be made as a result of such testing.
– Beta-testing
• Testing when development and testing are essentially completed and
final bugs and problems need to be found before release
Compiled By:Desalegn A. BiT, Software Testing 19
4) Acceptance Testing
• Objectives • Who
– To verify that the system meets  Users / End Users
the user requirements • Methods
• When  Black Box techniques
– After System Testing  Problem / Configuration
• Input  Management
– Business Needs & Detailed • Tools
Requirements  Compare, keystroke capture &
– Master Test Plan playback, regression testing
– User Acceptance Test Plan • Education
• Output  Testing Methodology
– User Acceptance Test report  Effective use of tools
 Product knowledge
 Business Release Strategy

Compiled By:Desalegn A. BiT, Software Testing 20


Test Case
• What: a set of inputs, execution preconditions and expected
outcomes developed for a particular objective, such as
exercising a particular program path or verifying compliance
with a specific requirement;
• Who: Quality Assurance.
• When: (planning)/(design)/coding/testing stage(s);
• Why:
– Plan test effort / resources / timelines;
– Plan / review test coverage;
– Track test execution progress;
– Track defects;
– Track software quality criteria / quality metrics;
– Unify Pass/Fail criteria across all testers;
– Planned/systematic testing vs Ad-Hoc.

Compiled By:Desalegn A. BiT, Software Testing 21


Cont’d
• Five required elements of a Test Case:
– ID – unique identifier of a test case;
– Features to be tested / steps / input values – what you need to do;
– Expected result / output values – what you are supposed to get from
application;
– Actual result – what you really get from application;
– Pass / Fail.
• Optional elements of a Test Case:
– Title – verbal description indicative of test case objective;
– Goal / objective – primary verification point of the test case;
– Project / application ID / title – for TC classification / better tracking;
– Functional area – for better TC tracking;
– Bug numbers for Failed test cases – for better error / failure tracking;
– Positive / Negative class – for test execution planning;
– Manual / Automatable / Automated parameter etc – for planning purposes;
– Test Environment.
Compiled By:Desalegn A. BiT, Software Testing 22
Testing life cycle-phases

• Requirements study
• Test Case Design and Development
• Test Execution
• Test Closure
• Test Process Analysis

Compiled By:Desalegn A. BiT, Software Testing 23


Cont’d
• Requirements study
– Testing Cycle starts with the study of client’s requirements.
– Understanding of the requirements is very essential for testing the
product.
• Analysis & Planning
– Test objective and coverage
– Overall schedule
– Standards and Methodologies
– Resources required, including necessary training
– Roles and responsibilities of the team members
– Tools used
• Test Case Design and Development
– Component Identification
– Test Specification Design
– Test Specification Review
Compiled By:Desalegn A. BiT, Software Testing 24
Cont’d
• Test Execution
– Code Review
– Test execution and evaluation
– Performance and simulation
• Test Closure
– Test summary report
– Project De-brief
– Project Documentation
• Test Process Analysis
– Analysis done on the reports and improving the
application’s performance by implementing new
technology and additional features.

Compiled By:Desalegn A. BiT, Software Testing 25


THANK YOU!

Compiled By:Desalegn A. BiT, Software Testing 26

You might also like