background image
<< Overview - Test Button | Overview - SilkTest architecture >>
Overview - The anatomy of a basic testcase
<< Overview - Test Button | Overview - SilkTest architecture >>
User's Guide
1 O
The anatomy of a basic testcase
The anatomy of a basic testcase
The following figure shows the organization of a typical automated testcase.
By convention, you place a group of testcases for a particular application
feature into a file called a script.
The testcase keyword Each automated test begins with the testcase
keyword. If you have worked with computer languages before, you can
consider a testcase a special kind of function, one with built-in error recovery
and results reporting capabilities.
The testcase name Immediately after the testcase keyword is the name of
the testcase. The testcase is a name of your choice that indicates the testing
task being performed.
Object-oriented commands The core of a testcase are the object-oriented
4Test commands that drive, verify, and clean up your application. For
example, consider this command from the preceding figure:
TextEditor.File.New.Pick ()
The first part of the command,
, is the name of a GUI
object. The last part of the command,
, is the operation to perform on the
GUI object. The dot operator (
) delimits each piece of the command. When
this command is executed at runtime, it picks the New menu item from the
File Menu of the Text Editor application.
Name of testcase
Testcase keyword
Testcase keyword