Developing
Test Cases from
Use Cases & Requirement
Specifications
USE CASE | REQUIREMENTS | TEST CASE
USE CASE
01 What is a use case? Understanding use case symbols, and actors,
systems, relationships.
USE CASE SYMBOLS
02 What do the test case symbols mean?
OUTLINE
USE CASE TESTING
03 How do you test a use cases?
TEST CASES
04 How do you develop test cases from requirement specifications?
What is a use case?
• A requirements modeling technique
• Describes the system's actions from the point of view of a user
• Tells a story on the interactions of a user with the system
• It is oriented toward satisfying a user's goal
They are
Capture the
helpful in giving
requirements
an overview of
of a system
a system
Importance of
Use Case
Models Drive
Validate a
implementation
system’s
and generate
architecture
test cases
Ways to represent a use case
2014 2015 2016 2017
A Textual or tabular descriptions B Diagrams or models
Use case symbols
• System
• Actor
• Relationship
Include Relationship • The linkage is based on a compulsory relationship.
Extend Relationship • Linking an optional use case to a standard use case.
Basic components of a
Use Case
• Name
• Actor(s)
• Preconditions
• Normal Flow of Events
• Alternative Path(s)
• Exception Path(s)
• Post Conditions
Sample Use Case
A technique in which test cases are
developed from the scenarios of use
cases.
What is Use
Case Testing?
Use Case Relationship to Test Cases
• Use cases provide a good starting
point for the design of test cases
• Which will be used to test that the
system meets the specified
requirements.
What is Use
Case
Testing?
A technique in which test
cases are developed from
the scenarios of use cases.
What are use
case scenarios or
paths?
It represents a possible path
through a use case specification
and there are 3 types:
• Normal Path
• Alternative Path
• Exception Path
Sample Use Case
LOGIN Use Case and Scenario Paths
Exception Path 1
3. System validates username
3a. Password screen not displayed due to
incorrect username
3b. System displays "Account Not Found"
Normal Path
1. System displays login page
2. User enters username
3. System validates username
4. User enters password
5. System validates password
6. Successful login
Exception Path 2
5. System validates password
3a. Unsuccessful login due to incorrect password
3b. System displays "Wrong password. Try again
or click ‘Forgot password’ to reset it"
Login Use Case Paths
Test Cases from the Login Use Case
HARRY MADUSHA
THANK YOU
C O N TA C T U S