background image
<< Lesson 5 Creating Testcases | Configuring SilkTest >>

Guidelines for Creating Testcases

<< Lesson 5 Creating Testcases | Configuring SilkTest >>
92
Getting Started: A Tutorial
5 C
REATING
T
ESTCASES
Guidelines for Creating Testcases
Guidelines for Creating Testcases
When creating a testcase, you should keep the following in mind:
·
A testcase has three fundamental tasks:
-
Drive the application to the state to be tested
-
Verify that the actual state matches the expected state
-
Return the application to its initial state (also called the base state)
·
Each testcase is independent of other testcases; that is, no script or
testcase should rely on the successful completion of a previous script or
testcase.
·
Each testcase should have a single purpose. This makes it easy to
determine specifically what aspect of the application is either working or
not working.
·
A testcase starts from base state. In order for a testcase to be able to
function properly, the application must be in a stable state when the
testcase begins to execute.
Tip After learning the basics of recording a testcase in the next
section, be sure to read about
"Recording from a Testplan" on
page 102
. That section describes how to make recording easier by
automatically generating the links that connect the testplan to the
testcase for you.
Recording a Testcase
There are three steps to recording a testcase:
·
Step 1: Setting up to Record
·
Step 2: Recording the Setup Stage
·
Step 3: Recording the Verification Stage
You must complete the exercises in this section consecutively.