Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Testing Fundamentals
Introduction to Software Testing and its importance
Software Testing
Software testing is a process to identify the correctness, completeness and quality of
developed software, it includes a set of activities conducted with the intent of
finding errors in software, so that it could be corrected before the product is
released to the end-users.
In simple words software testing is an activity to check that the software system is
defect free.
Pesticide Paradox:
Pesticide paradox in software testing is the process of repeating the
same test cases again and again eventually the same test cases will no
longer find new bugs.
So to overcome the pesticide paradox it is necessary to review the test
cases regularly and add or update them to find more defects.
Early Testing:
Testing should start as early as possible in the Software Development
Life Cycle. So that any defects in the requirements or design phase are
captured in early stages. It is much cheaper to fix a Defect in early stages
of testing.
It is recommended that you start finding the bug the moment the
requirements are defined.
The following figure is a graphical representation of the various stages of a typical SDLC.
STEP:1
STEP:2
STEP:3
STEP:4
STEP:5
STEP:6
SDLC Models:
Various software development life cycle models defined and designed which are followed during the
software development process.
Following are the most important and popular SDLC models followed in the industry:
Waterfall Model
Iterative Model
Spiral Model
V-Model
Big Bang Model
Other related methodologies are Agile Model, RAD Model and Prototyping Models.
Waterfall Design:
Waterfall approach was first SDLC Model to be used widely in Software Engineering
to ensure success of the project and also is an example for sequential model.
In "The Waterfall" approach, the whole process of software development is divided
into separate phases.
In this Waterfall model, typically, the outcome of one phase acts as the input for the
next phase sequentially.
Following illustration is a representation of the different phases of the Waterfall
Model.
S.No Phase Activities Performed Deliverables
2 System Design 1. As per the requirements, create the design HLD ( High Level
2. Capture the hardware / software Design document)
requirements.
3. Document the designs LLD (Low level
design document)
4 Testing 1. Integrate the unit tested code and test it to Test cases
make sure if it works as expected. 2. Perform Test reports
all the testing activities (Functional and non- Defect reports
functional) to make sure that the system meets Updated matrices.
the requirements.
3. In case of any anomaly, report it.
4. Track your progress on testing through tools
like traceability metrics, ALM
5. Report your testing activities.
Dis-advantages:
Cannot adopt the changes in requirements.
It becomes very difficult to move back to the phase. For example, if the application
has now moved to the testing stage and there is a change in requirement, It
becomes difficult to go back and change it.
Delivery of the final product is late as there is no prototype which is demonstrated
intermediately.
For bigger and complex projects, this model is not good as a risk factor is higher.
Not suitable for the projects where requirements are changed frequently.
Since the testing is done at a later stage, it does not allow identifying the challenges
and risks in the earlier phase so the risk mitigation strategy is difficult to prepare.
Conclusion:
In the waterfall model, it is very important to take the sign off of the
deliverables of each phase. As of today most of the projects are moving with
Agile and Prototype models, Waterfall model still holds good for smaller
projects. If requirements are straightforward and testable, Waterfall model
will yield the best results.
Iterative Model Design:
Example: Microsoft released Windows 8 and improved it based on user feedback and released the
next version (Windows 8.1).
Spiral Model undergoes 4 phases.
Advantages:
It allows requirement changes.
Suitable for large and complicated projects.
It allows better risk analysis.
Cost effective due to good risk management.
Disadvantages:
Not suitable for small projects.
Success of the project depends on risk analysis phase.
Have to hire more experienced resource especially for risk analysis.
V Model Design:
To understand the V model, let’s first understand what is verification and validation in software.
In V model, the development and QA activities are done simultaneously. There is no discrete phase
called Testing, rather testing starts right from the requirement phase. The verification and validation
activities go hand in hand. To understand the V model, let’s look at the figure below:
In a typical development process, the left hand side shows the development
activities and right hand side shows the testing activities.
I should not be wrong if I say that in the development phase both verification and
validation are performed along with the actual development activities. Now let’s
understand the figure:
Requirement analysis: In this phase the requirements are collected, analysed and studied. Here
how the system is implemented, is not important but, what the system is supposed to do, is
important. Brain storming sessions/walkthrough, interviews are done to have the objectives clear.
System requirements / High level design: In this phase a high level design of the software is build.
The team studies and investigates on how the requirements could be implemented. The technical
feasibility of the requirements is also studied. The team also comes up with the modules that would
be created/ dependencies, Hardware / software needs
Module design/ Low level Design: In this phase each and every module or the software components
are designed individually. Methods, classes, interfaces, data types etc are all finalized in this phase.
Right hand side demonstrates the testing activities or the Validation Phase. We will start from
bottom.
Unit Testing: In this phase all the unit test case, created in the Low level design phase are executed.
*Unit testing is a white box testing technique, where a piece of code is written which invokes a
method (or any other piece of code) to test whether the code snippet is giving the expected
output or not. This testing is basically performed by the development team. In case of any
anomaly, defects are logged and tracked.
Integration Testing: In this phase the integration test cases are executed which were created in the
Architectural design phase. In case of any anomalies, defects are logged and tracked.
*Integration Testing: Integration testing is a technique where the unit tested modules are
integrated and tested whether the integrated modules are rendering the expected results. In
simpler words, it validates whether the components of the application work together as expected.
Artifacts produced: Test results, Test logs, defect report, test summary report and updated
traceability matrices.
User acceptance Testing: Acceptance testing is basically related to the business requirements
testing. Here testing is done to validate that the business requirements are met in the user
environment. Compatibility testing and sometimes non-functional testing (Load, stress and volume)
testing are also done in this phase.
Each of these stages have a definite Entry and Exit criteria. Activities & Deliverables associated with
it.
Entry Criteria: Entry Criteria gives the prerequisite items that must be completed before testing can
begin.
Exit Criteria: Exit Criteria defines the items that must be completed before testing can be concluded
You have Entry and Exit Criteria for all levels in the Software Testing Life Cycle (STLC).
STAGE:1
STAGE-2
STAGE-3
STAGE-4
STAGE-5
STAGE-6
SDLC VS STLC
********************************************************************************