Use Cases and Test Cases Relation in Testing Process
Use Cases and Test Cases Relation in Testing Process
By Ms.Cherapa Wannasuk
Position: Senior Consultant
Gosoft (Thailand) Co.,Ltd.
E-mail: [email protected], [email protected]
Tel: +6626779471
Mobile: +66891408022
Abstract
Use cases make my life easier in doing the test cases. Use cases are nit usually
shown is the time used to operate each individual step in the main scenario and
extension. I will retrieve it from the non-functional requirement section. I get more
information by observation the business operation and/or discussion with System
Analyst. In this article I will explain use cases, test cases, how I develop and validate
my test cases. Finally I summarize the relation between use cases and test cases.
This is the document containing concept of work from my experience. I would like to
share to all of you the way I think and the way I apply to my job.
An actor is represents a user or another system that will interact with the system
you are modeling. A use case is an external view of the system that represents
some action the user might perform in order to complete a task.
Use Cases Diagram is used in almost every project. They are helpful in exposing
requirements and planning the project. During the initial stage of a project most use
cases should be defined, but as the project continues more might become visible.
System
Deposit
* *
*
Customer *
Withdraw
The detail of each use case will show in the narrative. The following pattern is one of
the most useful narratives one.
Use Cases ID UCD001
Name Deposit Money
Objective To deposit money to the Deposit Machine
Entry Conditions Customer selects Deposit button
Success End Customer gets deposit slip.
Condition
Fail End Condition Customer selects “Cancel” button.
Actors Customer, Cash Machine
Main Scenario 1. Customer press ‘Deposit’ button.
2. System prompts account number.
3. Customer enters 10 digits of account number and press
‘Confirm’ button.
4. System validates the account number.
5. System opens the drawer.
6. System pops up message “Please put the money in the
As a tester you need to study all the use cases and come up with one or more test
cases. The next topic I will explain you about my test case in detail.
Test case is the document that tells the working steps in checking the completeness
and correction of the deliverables. The main objectives of the test cases are the
following.
1. Plan to do the working steps as describe in the use cases references.
2. Check the deliverables to ensure that they pass the acceptance criteria.
3. Verify that only deliverables identify in the scope are developed.
4. Ensure that all steps are conformed to the use cases.
I have the Test Case Template that I have to fill in the information needed before
and after execution. The template is divided into three sections.
1. The first section contains the test objective, test environment, test type,
conditions required.
2. The second section contains the testing steps.
3. The last section will be used to record the test results.
Test Date:
Total Test Time:
Test By:
Eventually I will develop the test case. I put all use cases together and get how
many actors that I have to be. It should be the same as the high level of use cases.
It will look like I simulate the operation routines. This is the sample workflow that I
use to make the testing steps.
Notify Order
List the Product
status, Order
Confirm order Database Delivery for
amount and
tomorrow
delivery date
I create two test cases that cover three use cases. The use cases narrative may be
combine together in the test cases steps. The risk that I have identified has been
recorded and ready for execution. I can see the pre-condition and post-condition. I
know the interface required between each actor and what step they need. This flow
will also help me in validation of my test cases against the use cases.
I have list of use cases in the Requirement Traceability Metric. I update my test case
in it. I will know how many use cases that I have covered and how many that I
missed.
I use the detail in the use case to generate the testing steps. The table below is the
relation of both.
Use Cases Test Cases
ID Use as references
Objective Clarify the objective and make sure that the objective is
met by running the testing steps
Entry Conditions If they are specified in the use case they must be verified
that they are related to the system. They are required to
perform before execute this test case.
Success End criteria It is the output, message or evidence that tells me that
this use case execution is successfully ended.
Fail End Criteria This is the step that the actor terminates the working
process. The deliverables will not be generated. The
system will not perform any steps further after the actor
did this step. Sometimes audit trial is required so the
system has to record them. So in the test case will set up
the step to verify it.
Actors They are the role that I set the test case for. They will take
actions identify in the testing steps and record the actual
results. They have to record the name, testing date, time
used in the test case.
Main Scenario These are the steps that I copy some parts to the testing
steps. They are mostly related to system activities. The
system must act as defined in this section. In case the
system fails to perform these actions they will be recorded
in the actual result. The pass/fail criteria are put in the test
case. I normally noted working detail in the remark.
Extension The description that the system behaves after it cannot
succeed the specify operation such as the system cannot
find the account code, the connection is loss, the input is
not correct and etc.
The system must follow the steps described in detail here.
In the test case the testing steps should have them.