03 - Testing Life Cycle
03 - Testing Life Cycle
• In this Phase the Developers would write the Programs for the
Project by following the Coding standards.
• Module Design:
– In this phase the detailed internal design for all the system
modules is specified,
– referred to as Low Level Design (LLD).
– It is important that the design is compatible with the other
modules in the system architecture and the other external
systems.
– Tests are an essential part of any development process and
helps eliminate the maximum faults and errors at a very
early stage.
Coding Phase
• Acceptance Testing:
– The business requirement analysis phase and involves
testing the product in user environment.
– Acceptance tests uncover the compatibility issues with the
other systems available in the user environment.
– It also discovers the non functional issues such as load and
performance defects in the actual user environment
V- Model Application
• V- Model application is almost same as waterfall model, as
both the models are of sequential type.
• Requirements have to be very clear
• Following are the suitable scenarios to use V-Model:
– Requirements are well defined, clearly documented and
fixed.
– Product definition is stable.
– Technology is not dynamic and is well understood by the
project team.
– There are no ambiguous or undefined requirements. The
project is short.
– medical development field, as it is strictly disciplined
domain.
Pros & Cons
Pros Cons
•This is a highly disciplined model •High risk and uncertainty.
•Not a good model for complex and
•Phases are completed one at a time. object-oriented projects.
•Poor model for long and ongoing
•Works well for smaller projects where projects.
requirements are very well understood. •Not suitable for the projects where
requirements are at a moderate to high
•Simple and easy to understand and use. risk of changing.
•Once an application is in the testing
•Easy to manage due to the rigidity of the stage, it is difficult to go back and change
model . each phase has specific a functionality
deliverables and a review process. •No working software is produced until
late during the life cycle.
Waterfall Model
The waterfall model derives its name due to the cascading effect from one phase to the other.
In this model each phase well defined starting and ending point, with identifiable deliveries to
the next phase.
Note that this model is sometimes referred to as the linear sequential model or the software
life cycle.
Waterfall Model Cont..
1. In the requirements analysis phase
a) The problem is specified along with the desired service objectives (goals)
b) The constraints are identified
2. In the specification phase the system specification is produced from the detailed
definitions of (a) and (b) above. This document should clearly define the product function.
Note that in some text, the requirements analysis and specifications phases are combined
and represented as a single phase.
3.In the system and software design phase, the system specifications are translated into a
software representation. The software engineer at this stage is concerned with:
a) Data structure
b) Software architecture
c) Algorithmic detail and
d) Interface representations
The hardware requirements are also determined at this stage along with a picture of the
overall system architecture. By the end of this stage should the software engineer should be
able to identify the relationship between the hardware, software and the associated
interfaces. Any faults in the specification should ideally not be passed 'down stream'
Waterfall Model Cont..
4.In the implementation and testing phase stage the designs are translated into the
software domain
a) Detailed documentation from the design phase can significantly reduce the coding effort.
b) Testing at this stage focuses on making sure that any errors are identified and that the
software meets its required specification.
5.In the integration and system testing phase all the program units are integrated and
tested to ensure that the complete system meets the software requirements. After this
stage the software is delivered to the customer [Deliverable- The software product is
delivered to the client for acceptance testing.]
6.The maintenance phase the usually the longest stage of the software. In this phase the
software is updated to:
a) Meet the changing customer needs
b) Adapted to accommodate changes in the external environment
c) Correct errors and oversights previously undetected in the testing phases
d) Enhancing the efficiency of the software
Observe that feed back loops allow for corrections to be incorporated into the model. For
example a problem/update in the design phase requires a 'revisit' to the specifications
phase. When changes are made at any phase, the relevant documentation should be
updated to reflect that change.
Testing Levels
Testing levels are basically to identify missing areas and prevent overlap and repetition
between the development life cycle phases. In software development life cycle models there
are defined phases like requirement gathering and analysis, design, coding or
implementation, testing and deployment. Each phase goes through the testing. Hence there
are various levels of testing. The various levels of testing are:
1. Unit testing
2. Component testing
3. Integration testing
• Big bang integration testing
• Top down
• Bottom up
• Functional incremental
4. Component integration testing
5. System integration testing
6. System testing
7. Acceptance testing
8. Alpha testing
9. Beta testing
Unit Testing
• Unit testing is a method by which individual units of source code are tested to determine if
they are fit for use. A unit is the smallest testable part of an application like functions /
procedures, classes, interfaces.
• Unit tests are typically written and run by software developers to ensure that code meets its
design and behaves as intended.
• The goal of unit testing is to isolate each part of the program and show that the individual
parts are correct.
• A unit test provides a strict, written contract that the piece of code must satisfy. As a result,
it affords several benefits. Unit tests find problems early in the development cycle.
Integrating testing
• Integration testing tests integration or interfaces between components, interactions to
different parts of the system such as an operating system, file system and hardware or
interfaces between systems.
• In Big Bang integration testing all components or modules are integrated simultaneously,
after which everything is tested as a whole.
• Big Bang testing has the advantage that everything is finished before integration testing
starts.
• The major disadvantage is that in general it is time consuming and difficult to trace the
cause of failures because of this late integration.
Cont.
System Testing
• It verify whether all the system elements have been integrated & perform
the allocated functions.
• Once all the components are integrated, the application as a whole is
tested rigorously to see that it meets Quality Standards.
• Performed by a specialized testing team.
• System testing is so important because of the following reasons:
– first step in the Software Development Life Cycle, where the
application is tested as a whole.
– The application is tested thoroughly to verify that it meets the
functional and technical specifications.
– The application is tested in an environment which is very close to the
production environment where the application will be deployed.
– Enables tp test, verify and validate both the business requirements as
well as the Applications Architecture.
Acceptance Testing
• Most Important Stage.
• It is conducted by the Quality Assurance Team .
– who will gauge whether the application meets the intended specifications and satisfies
the client's requirements.
• The QA team will have a set of pre written scenarios and Test Cases that
will be used to test the application.
• Can range from informal test drive to a planed and systematically executed
serious of tests.
• This can be conducted over period of weeks or months.
• Acceptance tests are not only intended to point out simple spelling
mistakes, cosmetic errors or Interface gaps, but also to point out any bugs
in the application that will result in system crashers or major errors in the
application.
• There are also legal and contractual requirements for acceptance of the
system
Alpha testing
Alpha testing is one of the most common software testing strategy used in software
development. Its specially used by product development organizations.
• This test takes place at the developer’s site. Developers observe the users and note
problems.
• Alpha testing is testing of an application when development is about to complete. Minor
design changes can still be made as a result of alpha testing.
• Alpha testing is typically performed by a group that is independent of the design team, but
still within the company, e.g. in-house software test engineers, or software QA engineers.
• Alpha testing is final testing before the software is released to the general public. It has two
phases:
• In the first phase of alpha testing, the software is tested by in-house developers. They
use either debugger software, or hardware-assisted debuggers. The goal is to catch bugs
quickly.
• In the second phase of alpha testing, the software is handed over to the software QA
staff, for additional testing in an environment that is similar to the intended use.
• Alpha testing is simulated or actual operational testing by potential users/customers or an
independent test team at the developers’ site. Alpha testing is often employed for off-the-
shelf software as a form of internal acceptance testing, before the software goes to beta
testing.
Beta testing
• It is also known as field testing. It takes place at customer’s site. It sends the system to users
who install it and use it under real-world working conditions.
• A beta test is the second phase of software testing in which a sampling of the intended
audience tries the product out. (Beta is the second letter of the Greek alphabet.) Originally,
the term alpha test meant the first phase of testing in a software development process. The
first phase includes unit testing, component testing, and system testing. Beta testing can be
considered “pre-release testing.
• The goal of beta testing is to place your application in the hands of real users outside of
your own engineering team to discover any flaws or issues from the user’s perspective that
you would not want to have in your final, released version of the application.
Alpha Testing & Beta Testing
Cont..
Testing varieties
• Usability testing
• Install/uninstall testing
• Performance testing
• Recovery testing
• Security testing
• Compatibility testing
• Exploratory testing
• Ad-hoc testing
• User acceptance testing
• Comparison testing
• Alpha testing
• Beta testing
• Mutation testing
Black box testing
• Specification-based testing technique is also known as ‘black-box’ or input/output driven
testing techniques because they view the software as a black-box with inputs and outputs.
• The testers have no knowledge of how the system or component is structured inside the box.
In black-box testing the tester is concentrating on what the software does, not how it does it.
• The definition mentions both functional and non-functional testing. Functional testing is
concerned with what the system does its features or functions. Non-functional testing is
concerned with examining how well the system does. Non-functional testing like
performance, usability, portability, maintainability.
• The equivalence partitions are usually derived from the requirements specification for
input attributes that influence the processing of the test object.
• Testing uncovers sets of inputs that causes errors or failures, not just individual inputs.
What can be partitioned?
• Usually it is the input data that is partitioned.
• However, depending on the software unit to be tested, output data can be partitioned as
well.
• Each partition shall contain a set or range of values, chosen such that all the values can
reasonably be expected to be treated by the component in the same way (i.e. they may be
considered ‘equivalent’).
Recommendations on defining partitions
A number of items must be considered:
• All valid input data for a given condition are likely to go through the same process.
• Invalid data can go through various processes and need to be evaluated more carefully. For
example:
a blank entry may be treated differently than an incorrect entry,
a value that is less than a range of values may be treated differently than a value that is
greater,
if there is more than one error condition within a particular function, one error may
override the other, which means the subordinate error does not get tested unless the
other value is valid.
Equivalence partitioning example
• Example of a function which takes a parameter “month”.
• The valid range for the month is 1 to 12, representing January to December. This valid range
is called a partition.
• In this example there are two further partitions of invalid ranges.
x<1 1 ≤ x ≤ 12 12 < x
• Test cases are chosen so that each partition would be tested.
-2 5 17
x<1 1 ≤ x ≤ 12 12 < x
Boundary value analysis
• Equivalence partitioning is not a stand alone method to determine test cases. It is usually
supplemented by boundary value analysis.
• Boundary value analysis focuses on values on the edge of an equivalence partition or at the
smallest value on either side of an edge.
Equivalence partitioning with boundary value analysis
We use the same example as before.
Test cases are supplemented with boundary values.
-2 1 5 12 17
1 1
0 2
1 3
x<1 1 ≤ x ≤ 12 12 < x
Decision tables
Decision tables are a precise yet compact way to model complicated logic. Decision tables, like
if-then-else and switch-case statements, associate conditions with actions to perform.
But, unlike the control structures found in traditional programming languages, decision tables
can associate many independent conditions with several actions in an elegant way.
Decision Tables - Usage
Decision tables make it easier to observe that all possible conditions are
accounted for.
Action stub
Action2 No No Yes No
Action3 No No No Yes
Action Entry
Decision Tables – Structure Cont..
• We can specify default rules to indicate the action to be taken when
none of the other rules apply.
• When using decision tables as a test tool, default rules and their
associated predicates must be explicitly provided.
Condition2 X Yes X No
Condition3 Yes X No No
Condition4 No No Yes X
Printer is unrecognized Y N Y N Y N Y N
Check/replace ink X X X X
Printer Troubleshooting
Decision Table Example
State Transition Testing
What is State Transition Testing?
State Transition testing, a black box testing technique, in which outputs are triggered by changes
to the input conditions or changes to 'state' of the system. In other words, tests are designed to
execute valid and invalid state transitions.
When to use?
• When we have sequence of events that occur and associated conditions that apply to those
events
• When the proper handling of a particular event depends on the events and conditions that
have occurred in the past
• It is used for real time systems with various states and transitions involved
Deriving Test cases:
• Understand the various state and transition and mark each valid and invalid state
• Defining a sequence of an event that leads to an allowed test ending state
• Each one of those visited state and traversed transition should be noted down
• Steps 2 and 3 should be repeated until all states have been visited and all transitions
traversed
• For test cases to have a good coverage, actual input values and the actual output values have
to be generated
State Transition Testing Cont..
Example:
A System's transition is represented as shown in the below diagram:
State Transition Testing Cont..
The tests are derived from the above state and transition and below are the possible
scenarios that need to be tested.
input(Y)
if (Y<=0) “nodes”
then
Y := −Y
end_if
while (Y>0)
do “edges”
input(X)
Y := Y-1
end_while
Unit testing
• End-to-end testing
– Similar to system testing,
– involves testing of a complete application environment in a situation
that mimics real-world use, such as interacting with a database, using
network communications, or interacting with other hardware,
applications, or systems if appropriate.
• Sanity testing -
– Testing to determine if a new software version is performing well
enough to accept it for a major testing effort.
– If application is crashing for initial use then system is not stable
enough for further testing and build or application is assigned to fix.
Regression Testing
• Whenever a change in a software application is made it is quite
possible that other areas within the application have been affected
by this change.
• The intent of Regression testing is to ensure that a change,
– such as a bug fix did not result in another fault being uncovered in the
application.
• Regression testing is so important because of the following reasons:
– Minimize the gaps in testing when an application with changes made
has to be tested.
– Testing the new changes to verify that the change made did not affect
any other area of the application.
– Mitigates Risks when regression testing is performed on the
application.
– Test coverage is increased without compromising timelines.
– Increase speed to market the product.
Performance Testing
• It is mostly used to identify any bottlenecks or performance issues rather
than finding the bugs in software.
• There are different causes which contribute in lowering the performance
of software:
– Network delay.
– Client side processing.
– Database transaction processing.
– Load balancing between servers.
– Data rendering.
• Performance testing is considered as one of the important and mandatory
testing type in terms of following aspects:
– Speed (i.e. Response Time, data rendering and accessing)
– Capacity
– Stability
– Scalability
• It can be either qualitative or quantitative testing activity and can be
divided into different sub types such as Load testing and Stress testing.
Load Testing
• Some types of review are completely informal, while others are very
formal.
• The decision on the appropriate level of formality for a review is usually
based on combinations of the following factors:
• The maturity of the development process: the more mature the process is,
the more formal reviews tend to be.
• Legal or regulatory requirements.
• The need for an audit trail. Formal review processes ensure that it is
possible to trace backwards throughout the software development life
cycle
• Reviews can also have a variety of objectives,
– Finding defects.
– Gaining understanding.
– Generating discussion.
– Decision making by consensus.
• The way a review is conducted will depend on what its specific objective is
Types of Review
• It is an ongoing activity.
• It involves comparing actual progress against the
plan and reporting the status, including deviations
from the plan.
• Test control guides the testing to fulfill
– the mission, strategies, and objectives, including revisiting
the test planning activities as needed.
Metrics to monitor test planning and control
• May include
– Risk and test coverage
– Defect discovery and information
– Planned versus actual hours to develop test ware
and execute test cases
Test Analysis & Design