Lecture 2: Software Test Case Design
Strategy for software testing provides a road map that describes the steps to be conducted as part of
testing, these steps are planned and then undertaken, and how much effort, time, and resources will
be required. Therefore, any testing strategy must incorporate test planning, test case design, test
execution, and resultant data collection and evaluation.
Testing is a set of activities that can be planned in advance and conducted systematically.
For this reason a template for software testing—a set of steps into which you
can place specific test case design techniques and testing methods—should be
defined for the software process.
A number of software testing strategies have been proposed in the literature.
All provide you with a template for testing and all have the following generic
characteristics:
• To perform effective testing, you should conduct effective technical reviews
(Chapter 15). By doing this, many errors will be eliminated before testing
commences.
• Testing begins at the component level and works “outward” toward the
integration of the entire computer-based system.
• Different testing techniques are appropriate for different software engineering
approaches and at different points in time.
• Testing is conducted by the developer of the software and (for large projects)
an independent test group.
• Testing and debugging are different activities, but debugging must be accommodated
in any testing strategy.
A strategy for software testing must accommodate low-level tests that are necessary
to verify that a small source code segment has been correctly implemented
as well as high-level tests that validate major system functions against customer
requirements. A strategy should provide guidance for the practitioner and a set of
milestones for the manager. Because the steps of the test strategy occur at a time
when deadline pressure begins to rise, progress must be measurable and problems
should surface as early as possible.
Software Requirements
- Clearly defined requirements are signs of successful project.
- They establish a formal agreement between clients and providers that they are both
working to reach the same goal.
- High-quality, detailed requirements also help mitigate financial risks and keep the project
on schedule.
Types of requirements
Business requirements
High-level statements of goals, objectives, and needs. They state the problem and the business
objective to be achieved, such as
increased revenue/throughput/customer reach,
reduced expenses/errors,
improved customer service, etc.
User/Stakeholders requirements
- Reflects the needs of discrete stakeholder groups - top-level managers, nonmanagement
staff, customers,
- Defines what they expect from the solution.
- Serve as a bridge between generalized business requirements and specific solution
requirements.
- Can include, for example, the ability to create various reports, view order history and
status, manage customer databases, etc.
Other requirements
They describe specific characteristics that the software must have to meet the needs of the
stakeholders and the business itself. They fall into two large groups.
Functional requirements define what a product must do and what its features and
functions are.
Non-functional requirements describe the general properties of a system. They are also
known as quality attributes.
Functional vs non-functional requirements
Functional and nonfunctional requirements are two fundamental categories of requirements in
software development. Each type plays a vital role in defining the characteristics and operation of
the solution.
Functional vs nonfunctional requirements
What are functional requirements?
Features or functions that developers must implement to enable users to accomplish their tasks. So
it’s essential to make them clear both for the development team and the stakeholders. Generally,
functional requirements describe system behavior under specific conditions.
Functional requirements examples
Functional requirements for a website or mobile application should define user flows and various
interaction scenarios.
1. The system sends a confirmation email when a new user account is created.
2. The system sends an approval request after the user enters personal information.
3. A search feature allows users to search content/items by entering the query in the
search bar.
4. The user can review items in the cart, change their number, or remove them before
checkout.
5. The app should allow users to create accounts and log in using credentials like
email and password or through social media integration.
6. The app can send notifications to users for updates, reminders, or promotional
content.
7. Users should be able to provide feedback or rate services/products within the app.
More specialized software systems will have more specific requirements. For example, a hotel
property management system will include such requirements as “the user should be able to view
and update room status” or “the system must aggregate bills from all points of service in a
folio.”
What are non-functional requirements?
Non-functional requirements are not related to the system's functionality but rather define how the
system should perform. They are crucial for ensuring the system's usability, reliability, and
efficiency, often influencing the overall user experience. We’ll describe the main categories of
non-functional requirements in detail further on.
Non-functional requirements examples
Some examples of non-functional requirements are:
1. The website pages should load in 3 seconds with the total number of simultaneous users <5
thousand.
2. The system should be able to handle 20 million users without performance deterioration.
3. The payment processing gateway must be PCI DSS compliant.
4. A program running on Windows 10 must be able to run on Windows 11 without any
change in its behavior and performance.
TEST CASE
Test cases are designed to verify that your application is operating as expected. Software testers,
design test cases to determine whether an app or software system's feature is working correctly.
Applications must be tested thoroughly to find out how the system behaves under all possible input
conditions
- A Test case is a group of steps that is to be executed to check the functionality of a specific
object or an operational logic.
- Test case describes the user input and the system response with some preconditions to
determine the correctness and completeness of the functionality.
- Test case is usually associated with at least one business function/requirement that is being
validated. It requires a specific test data to be developed for input during, test case
execution.
- The test case execution may be governed by preconditions than are required or setup before
the execution of the test case, such as database suport, printer setup, or data that should
exist at the start of the test case execution. A test case is a self - standing and self-cleaning
test with a specific purpose that points back to the specifications, and if failed, it points to
the bug.
Test case Design Methods
Test cases can be designed based on the Functional specifications
Functional Specification Based Test Case Design
It uses the functional specification document. This type of testing activity checks whether the
product is working as per the functional specifications
Test case for Functional Specification Example
A login process allows user id and password to authorize users. To authorize, users must give
alphanumeric in lowercase from 4 to 16 characters long for user id and alphabets in lowers
case from 4 to 8 characters long for password
Test cases: Verify user-id entry
BVA ECP
Min 4 chars Pass Valid In valid
Min-1 3 chars fail
A to Z
Min+1 5 chars Pass
0 to 9 Special
Max 16 chars Pass characters,
Max+1 17 chars Fail
Blank
Max-1 15chars pass
Test case 2: Verify password Entry
BVA
Min 4 chars Pass ECP
Max 8 chars pass Valid In valid
Max+1 9 chars fail a to z A to Z
Min-1 3 chars Fail Special
characters,
Test case 3: Login operation (test procedure)
User ID Password Criteria
Valid Valid Pass
Valid Invalid Fail
Invalid Valid Fail
Value Blank Fail
Assignment
Q. Link your test – cases
to the requirement using
Testlink Tool
Linking Test Cases and
Requirements
Testlink is a software
that is based on the web
and it is used popularly
for test management, it is
a tool or software that
can be used for QA
testing or quality
assurance testing.
Linking test cases and
requirements in any
testing software can be a
challenging task but in
the case of Testlink, it
allows us to quickly link
the test cases with the
requirements as well as
the user roles with the
help of predefined
features within the
software. This article
focuses on discussing
linking test cases and
requirements in Testlink.