Lecture 27-29 (Testing Stratagies)
Lecture 27-29 (Testing Stratagies)
Introduction
• A strategy for software testing integrates the design of software
test cases into a well-planned series of steps that result in
successful development of the software.
3
Example of testcase
Test Case ID Test Scenario Test Steps Test Data Expected Results Actual Results Pass/Fail
TU01 Check Customer 1.Go to site http:// Userid = xyz User should Login As Expected Pass
Login with valid demo.xyz.com Password = into an application
Data 2.Enter UserId pass99
3.Enter Password
4.Click Submit
TU02 Check Customer 1.Go to site http:// Userid = xyz User should not As Expected Pass
Login with invalid demo.xyz.com Password = Login into an
Data 2.Enter UserId glass99 application
3.Enter Password
4.Click Submit
4
A Strategic Approach to Testing
General Characteristics of Strategic Testing
1. To perform effective testing, a software team should
conduct effective formal technical reviews
7
Verification and Validation
• Software testing is part of a broader group of activities called
verification and validation that are involved in software quality
assurance
• Verification (Are the algorithms coded correctly?)
– The set of activities that ensure that software correctly
implements a specific function or algorithm
– Are we building the product right?
8
Validation
Verification
Verification refers to the set of activities that Validation refers to the set of activities that ensure
Definition ensure software correctly implements the that the software that has been built is traceable to
specific function customer requirements.
It includes checking documents, designs, codes,
Focus It includes testing and validating the actual product.
and programs.
Type of Testing Verification is the static testing. Validation is dynamic testing.
Execution It does not include the execution of the code. It includes the execution of the code.
Methods used in verification are reviews, Methods used in validation are Black Box Testing,
Methods Used
walkthroughs, inspections and desk-checking. White Box Testing and non-functional testing.
9
Real-World Example of Verification vs
Validation
• Verification Example: Imagine a team is developing a new
mobile banking app.
• During the verification phase, they review the requirements
and design documents.
• They check if all the specified features like fund transfer,
account balance check, and transaction history are included
and correctly detailed in the design.
• They also perform peer reviews and inspections to ensure the
design aligns with the requirements.
• This step ensures that the app is being built according to the
initial plan and specifications without actually running the
app.
10
• Validation Example: In the validation phase, the team starts
testing the mobile banking app on actual devices.
• They check if users can log in, transfer money, and view their
transaction history as intended.
• Testers perform usability tests to ensure the app is user-
friendly and functional tests to ensure all features work
correctly.
• They might also involve real users to provide feedback on the
app’s performance.
• This phase ensures that the app works as expected and meets
user needs in real-world scenarios.
11
A Strategy for Testing Conventional
Software
System Testing
r s to
pe
Validation Testing
de w
co
o a ro
Br Nar
Integration Testing
Unit Testing
Code
Design
re to
nc t
co strac
te
Requirements
Ab
System Engineering
12
• Initially, system engineering defines the role of software
and leads to software requirements analysis, where the
information domain, function, behavior, performance,
constraints, and validation criteria for software are
established.
13
• Unit testing begins at the vortex of the spiral and concentrates on each unit
(e.g., component, class, or WebApp content object) of the software as
implemented in source code.
• Finally, you arrive at system testing, where the software and other system
elements are tested as a whole.
14
Software Testing steps
15
• Unit testing
Software Testing steps
– tests focus on each component individually, ensuring that it
functions properly as a unit.
– Exercises specific paths in a component's control structure to
ensure complete coverage and maximum error detection
– Components are then assembled and integrated to form
complete software package.
• Integration testing
– addresses the issues associated with the dual problems of
verification and program construction.
– Focuses on inputs and outputs, and how well the
components fit together and work together .
16
• Validation testing
– Provides final assurance that the software meets all
functional, behavioral, and performance requirements.
• System testing
– Verifies that all system elements (software, hardware,
people, databases) mesh properly and that overall
system function and performance is achieved
17
Textbook
Software Engineering, A Practitioner’s
Approach- Roger S. Pressman,McGraw Hill
Edition, 6 th edition,2013(Chapter -13)
18