Anatomy of a Basic Test Case

A test case is comprised of testcase keywords and object-oriented commands. You place a group of test cases for an application into a file called a script.

Each automated test for an application begins with the testcase keyword, followed by the name of the test case. The test case name should indicate the type of testing being performed.

The core of the test case is object-oriented 4Test commands that drive, verify, and clean up your application. For example, consider this command:


The first part of the command, TextEditor.File.New, is the name of a GUI object. The last part of the command, Pick, 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.