This chapter provides an overview of the PeopleSoft Test Framework (PTF) test structure and discusses the PTF test language.
A PTF test is composed of a series of steps. This example shows the steps in a simple test.
Each step in a test is composed of nine or ten fields, as defined in the following table:
Seq (sequence) |
A system-generated sequence number. Test steps execute according to the Seq order. When you copy, move, add, or delete a step, Seq is refreshed. |
ID |
A system-generated unique identifier for each step, in a test. The ID value does not change when you move, add, or delete a step. Test maintenance reports use the ID value. |
Comment |
Click in this field to add a comment for the step. |
Active |
Deselect this field to inactivate a step. PTF l skips inactive steps when the test runs. Each step is active by default. This field is grayed for inactive steps. |
Scroll ID |
This field is required only for scroll handling. |
Type |
The type of application object to take an action on or to validate. Common step types are Text, Checkbox, Browser, and so on. |
Action |
The action the test is to take on the object. The two most common actions used on a Text object, for example, would be Set_Value and Verify. |
Recognition |
The means that PTF uses to identify the object within the application. Commonly, this is the HTML ID property. |
Field Label |
Displays the label for the field referenced in the step. The Field Label column appears in a test when Column is selected in the Show Field Label field in Local Options. If Tooltip is selected in the Show Field Label field, the field label appears in a tooltip. |
Value |
In a typical recorded step, this is the value the tester entered for an object. In a step recorded in verify mode, this would be the value that was present in the object when it was verified. |
As a rule, a test has a single step for each instruction in a manual test case. For example, consider the following manual test instruction:
12. Enter the value "KU0001" into the text box labeled "Employee ID".
This test instruction could be represented in PTF as a step, as shown in this example:
The PTF test language syntax and vocabulary are designed to read like a technical version of English. As a result, the function of most steps should be apparent from their construction and the context of surrounding steps.
The following chapter, “Test Language Reference,” is a reference for all the PTF step types and actions.
This section discusses:
Validation
Parameters
Variables
Reserved words
Each step type allows only certain actions. Similarly, each action can only be used with certain step types.
The PTF Test Editor automatically limits your choice of actions based on the step type selected.
For example, if a step has the Type field set to Text and the Action field set to Set_Value, you can change the Action field to Verify since it is included in the list of available values for a text object.
This example shows a drop-down list with Verify as one of the values for the Action field when the Type field is set to Text:
Action drop-down list for Text
Typically, you place parameters in the Recognition field and use the following structure:
param=value;
Separate parameters with a semi-colon.
For example:
prcname=RCOM01; wait=true;
With a Radio object, you can also place parameters in the Value field.
See Radio.
Steps that return a value require the parameter ret=&variable;
For example:
ret=&chart_val;
The system ignores unneeded parameters. For example, Browser.Start and Browser.Start_Login do not take any parameters, so the system ignores any values in the Recognition field for Browser.Start or Browser.Start_Login.
Variables enable you to work with steps in which the information or values are not known when you create the test or the information or values for a step change each time the test executes.
You prefix variables with an ampersand (&).
In this example, the first step stores the value in the OPRID field to the variable &OPRID. The second step populates the field OPRDEFNDESC with the value in the variable &OPRID.
System variables are predefined variables that PTF populates at runtime. For instance, %test% is populated with the test name at runtime.
See System Variables.
See Also
Developing and Debugging Tests
Similar to variables, you use reserved words to supply information that is not known until a test executes.
Prefix reserved words with a pound sign (#) and use them in the Value field of a test to verify a condition, change the value in an application field, or both. In this example, the #TODAY reserved word sets the EFFDT_FROM field to the current date.
See Also
System variables are predefined variables that PTF populates at runtime. System variables provide data about the current environment, execution options, test, and application.
Because system variables are replaced with a text string at runtime, you can place a system variable wherever you would place a text string. Commonly, test developers assign a system value to a user-defined variable.
The following example shows two methods of assigning system variables to user-defined variables:
See Also