Professional Documents
Culture Documents
Unit - Iv: Software Testing
Unit - Iv: Software Testing
Software Testing
Topics
• Introduction to Testing
• Verification
• Validation
• Test Strategy
• Planning
• Example – Test Strategy and Planning
• Test Project Monitoring and Control
• Design – Master Test Plan, Types
• Test Case Management
• Test Case Reporting
2
Software Testing
Introduction
• It is a fact that the exact number of defects in a software product is difficult to
find.
• At best it can be predicted using some defect estimation tools.
• It is also impossible to detect all defects in a software product.
• Nevertheless, finding and fixing critical bugs up to an acceptable limit as per
expectations is important.
• If there are more defects in the product after the product enters production,
then the project team will be in big trouble.
• The support costs for a bug ridden product will be too high.
• So, less than required testing is a certain call for rebuke from stakeholders.
• Testing more than required will increase project costs unnecessarily.
• When the project starts, the customer specifies what level of quality for the
product is expected.
• The project manager needs to first make sure that the processes to be followed
for building the product are at least so good that the produced product will have
a certain level of quality with a certain level of defects.
Software Testing
Introduction
• Then, they should have a test plan such that the product defects are further
reduced by finding defects and fixing them.
• So the testing phase must be well planned with required budget, schedule and
testing processes that will ensure that a certain number of critical defects are
caught and fixed (Figure below-Software Testing Scenarios).
Software Testing
Introduction – Problems with Traditional Development Model
• Traditionally, software testing was done only after software was constructed.
• This is used to limit the scope of software testing in the development life cycle
(see Figure below-Traditional Software Development Model-Too little, Too late
testing).
• This practice led to a situation that was too little and too late.
• By the time software was constructed, already faulty requirement specifications
and faulty software design had resulted in defect ridden software.
Software Testing
Introduction – Problems with Traditional Development Model
• Removing all the defects originating from different phases of the project in one
go is a huge challenge.
• That is why this approach always used to result in defect ridden software
products.
• Even if there was an attempt to remove defects so late in the life cycle, it would
be exorbitantly costly to do so in one go and it would also mean devoting a
considerable amount of time in detecting and fixing all those defects.
• This would likely be infeasible.
• Definitely a better approach was needed to make better quality software
products.
Software Testing
Verification and validation
• The problems encountered in the traditional approach to software testing led to
the practice of verification and validation.
• In most quality standards documents, software testing is divided into two parts:
“validation” and “verification.”
• While verification implies that the developed software is working as intended by
checking the requirement specifications, design, source code, etc., in static
mode, validation implies that the software has been validated to be working
after running it and checking whether all functionality meets the requirements.
• Verification techniques are also known as static testing, since the source code is
not run to do testing.
• The figure below (Software verification and validation) shows that each work
product including requirement specifications, design, and source code during
software development is tested using static methods.
• The requirement specifications are reviewed for completeness, clarity, design
ability, testability, etc.
• The software design is reviewed for robustness, security, implementability,
scalability, complexity, etc.
Software Testing
Verification and Validation
• The source code is reviewed for dead code, unused variables, faulty logic,
constructs, etc.
• Once the source code is ready to be run as a system, validation testing can be
started.
Verification testing
• Verification testing includes different activities
such as business requirements, system
requirements, design review, and code
walkthrough while developing a product.
• It is also known as static testing, where we are
ensuring that "we are developing the right
product or not". And it also checks that the
developed application fulfilling all the
requirements given by the client.
Verification testing
Software Testing
Validation
• Validation testing is also known as dynamic testing as, in this case, the source
code is actually run to determine that it is running per specifications.
• During validation, unit, integration, system, and finally user acceptance testing
are performed.
• Unit testing is done to ensure each unit piece of source code is free from
defects.
• Once unit testing is done, then this piece of code is integrated with the main
source code build.
• But before integrating to the main build, it is strongly advisable to do local
integration testing on the developer’s own computer.
• Only when the source code runs smoothly and all integration tests pass, the
source code should be integrated with the main build.
• When all source code is thus integrated, the main build is ready for system
testing.
• All system tests are then performed and defects are fixed.
• When the system testing is over and in fact the software product is shipped to
customers, they do user acceptance testing.
Validation testing
• Validation testing is testing where tester
performed functional and non-functional testing.
Here functional testing includes Unit Testing (UT),
Integration Testing (IT) and System Testing (ST),
and non-functional testing includes User
acceptance testing (UAT).
• Validation testing is also known as dynamic
testing, where we are ensuring that "we have
developed the product right." And it also checks
that the software meets the business needs of the
client.
Validation testing
Verification Validation
We check whether we are developing the right product or We check whether the developed product is right.
not.
Verification is also known as static testing. Validation is also known as dynamic testing.
Verification includes different methods like Inspections, Validation includes testing like functional testing, system
Reviews, and Walkthroughs. testing, integration, and User acceptance testing.
It is a process of checking the work-products (not the final It is a process of checking the software during or at the
product) of a development cycle to decide whether the end of the development cycle to decide whether the
product meets the specified requirements. software follow the specified business requirements.
Quality assurance comes under verification testing. Quality control comes under validation testing.
The execution of code does not happen in the verification In validation testing, the execution of code happens.
testing.
In verification testing, we can find the bugs early in the In the validation testing, we can find those bugs, which
development phase of the product. are not caught in the verification process.
Verification is done before the validation testing. After verification testing, validation testing takes place.
In this type of testing, we can verify that the inputs follow In this type of testing, we can validate that the user
the outputs or not. accepts the product or not.
Software Testing - Test Strategy
Test Strategy and Planning
• Software testing is a vast field in itself, and so the common practice is to
consider it as a separate project.
• In those cases, it is known as an independent verification and validation project.
• As such, a separate project plan is made for that project and is linked to the
parent software development project.
• There are many techniques available to execute software test projects.
• It depends on the kind of test project. However, most test projects must have a
test plan and a test strategy before the project can be ready for execution.
• Often due to time constraints, testing cycles are cut short by project managers.
• This leads to a half-tested product that is pushed out of the door.
• In such cases, a large number of product defects are left undetected.
• Ultimately, end users discover these defects. Fixing these defects at this stage is
costly.
• Moreover, they cannot be fixed one at a time.
• They are to be taken in batches and are incorporated in maintenance project
plans.
• This leads to excessive costs in maintaining the software.
• What is Test Plan?
– The test plan is a base of software testing
– It is a detailed document, which includes several testing
attributes such as test objectives, scope, test schedule,
template, required resources (human resources, software, and
hardware), test estimation and test deliverables, risk,
mitigation plan, defect tracking, entry and exit criteria, test
environment, etc., which defines software testing areas and
activities.
• What is a Test Strategy?
– The test strategy is a high-level document used to validate the test
levels to be executed for the product. And it also describes what
kind of technique has to be used and which module will be tested.
– It contains various components like documentation formats,
objectives, test processes, scope, customer communication
strategy, etc.
– The Test Strategy's main purpose is to deliver a systematic
approach to the software testing process to ensure reliability,
quality, traceability, and better planning.
Software Testing
Test Strategy and Planning
• It is a lot cheaper to trap those bugs during the testing cycle and fix them.
• It is appropriately said that “testing costs money but not testing, costs more!”
• Test strategies should include things like test prioritization, automation strategy,
risk analysis, etc.
• Test planning should include a work breakdown structure, requirement review,
resource allocation, effort estimation, tools selection, setting up communication
channels, etc.
Test Prioritization
• Even before the test effort actually starts, it is of utmost importance that the test
prioritization should be made.
• First of all, all parts of the software product will not be used by end users with
the same intensity.
• Some parts of the product are used by end users extensively, while other parts
are seldom used.
• So the extensively used parts of the product should not have any defects at all
and thus they need to be tested thoroughly.
Software Testing
Test Strategy and Planning - Test Prioritization
• For making such a strategy, you must prioritize your testing.
• Put a high priority on tests which are to be done for these critical parts of the
software product and put a low priority on uncritical parts.
• Then test the high priority areas first.
• Once testing is thoroughly done for these parts, then you should start testing
the low priority areas.
• If the testing is done for an in-house software product, traditionally, it is used to,
not be a performance evaluation measurement.
• What really counted was the number of defects found in production when the
software product was deployed and used by end users.
• But it is too late for a performance measurement.
Software Testing
Test Project Monitoring and Control – Defect Tracking
• What if many of the test team members left before the product was deployed?
• In fact this is a reality, given the high attrition rate (as much as 20% at many
corporations) of software professionals.
• Once they are gone, there is no point in measuring the performance.
• Thus, a better measurement would allow for more immediate results.
• This is achieved by measuring the defect count per hour per day.
• Then there is the case of outsourced test projects.
• If the contract is only for testing up to deployment and not afterward, then
measurement does not make sense after the contract has ended.
• A good defect tracking application should be deployed on a central server that is
accessible to all test and development teams.
• Each defect should be logged in such a way that it could be understood by both
development and testing teams.
• Generally, the defects should be reproducible, but in many instances, this is
difficult.
• In such instances, a good resolution should be made by the test and
development managers.
Software Testing
Test Case Reporting
• During the execution of a test project, many initial and final reports are made.
• But status reports also need to be made.
• Test reports include test planning reports, test strategy reports, requirement
document review comments, number of test cases created, automation scripts
created, test execution cycle reports, defect tracking reports, etc.
• Some other reports include trace-ability matrix reports, defect density, test
execution rate, test creation rate, test automation script writing rate, etc.
REFERENCES
• Ashfaque Ahmed, Software Project Management: A Process-driven approach,
Boca Raton, Fla: CRC Press, 2012.
THANK YOU