You are on page 1of 5

UTC DOCUMENT

A unit test specification comprises a sequence of unit test cases. Each unit test case

should include four essential elements:

• A statement of the initial state of the unit, the starting point of the test case (this is

only applicable where a unit maintains state between calls);

• The inputs to the unit, including the value of any external data read by the unit;

• What the test case actually tests, in terms of the functionality of the unit and the

analysis used in the design of the test case (for example, which decisions within the

unit are tested);

• The expected outcome of the test case (the expected outcome of a test case should

always be defined in the test specification, prior to test execution).

Unit Test Case Sample

Test Case Expected Actual Pass/Fai


Test Case ID Input Data
Description Result Result l Remarks

1. Login
Validity is
checked and
1.correct username
TO LOGIN TO user is taken
and password
THE PRISON to its
1.LOGIN FORM
MANAGEMENT homepage.
2.wrong usename or
SYSTEM
password
2. The user is
shown the
error page
2.Register form The new user can 1.Visitor provides the 1.The
register here full details of the form completeness
of data is
2.full details is not checked and
provided database is
updated.

2. The data
completeness
check fails and
the user is
prompted to
provide all
details.

1.Retrieved
the nominal
1.click on the nominal roll register,
roll register, case case register,
All the police register, parole register, parole
3.homepage(police officers will be in-out register from the register, in-out
officers) taken to this register from
homepage.
homepage.
the data base
and viewing of
data.
1.the database
is updated .

1.click on update to 2. Retrieved


update database the nominal
roll register,
The admin user 2. click on view to view case register,
4.homepage(admin will be taken to different forms like parole
) this page after nominal register,visitors register, in-out
login details,case register from
register,parole register the data base
and visitors information. and viewing of
data.

1.retrieve the
1.in view or ready-only prisoner
mode. details from
the nominal
2.to update prisoner roll register in
details like the database.
The details of the id,name,age,height.enter
prisoner and 2.the given
the details in the
his/her
5.nominal roll respective text fields(by data is
demographic
register updated in the
details are admin only)`
captured in this database .
form 3.the police officers want
to change records of the 3.the user is
prisoner. prompted to
contact admin
for making
changes.
1.retrieve the
prisoner
1.in view or ready-only details from
mode. the case
register in the
2.to update prisoner database.
details like case id,case
This includes the description and case 2.the given
sentence details, type(by admin only)` data is
6.Case register
remand/conviction updated in the
details, 3.the police officers want database .
to change records of the
prisoner. 3.the user is
prompted to
contact admin
for making
changes.

1.retrieve the
prisoner
parole details
1.in view or ready-only from the
mode. parole register
The details of in the
prisoners to be 2.to update prisoner database.
released on a details like case parole
day,
details(by admin only)` 2.the given
the next day, the
7.Parole register data is
next week, the
next month, or 3.the police officers want updated in the
any to change records of the database .
given duration of prisoner.
time. 3.the user is
prompted to
contact admin
for making
changes.
1.retrieve the
prisoner in-
outdetails
1.in view or ready-only from the
An in-out register mode. parole register
will track all
prisoners and in the
2.to update prisoner
others who move database.
details like prisoners
in and out for
who move in and out(by
various 2.the given
8. In-out register reasons. This admin only)` data is
should include updated in the
provisions for 3.the police officers want
recording database .
to change records of the
the prisoners sent prisoner.
to courts for 3.the user is
hearing. prompted to
contact admin
for making
changes.

You might also like