Using the Test Editor
When you create or open a test, test case, or shell test, it opens in the Test Editor. The Test Editor enables you to:
Record and edit test steps.
Add, copy, and delete test steps.
Create and edit test cases.
View both test and test case in a single view.
Debug tests.
This example shows the PTF Test Editor:
The following menus appear when the Test Editor has focus. Note that many menu commands are specific to the currently selected step.
This table describes the Test Editor PTF menu commands:
PTF Menu Commands |
Usage |
---|---|
Projects |
Opens the Projects dialog box. |
Local Options |
Open the Local Options dialog. |
Execution Options |
Open the Execution Options dialog. |
This table describes the Test Editor Test menu commands:
Test Menu Commands |
Usage |
---|---|
Save |
Saves the current test. |
Save As |
Creates a copy of the current test with a new name. |
Test Case Save As |
Creates a test case as a copy of the current test case. |
Export |
Export test cases and test case values to a character-delimited text file, such as comma-separated values (csv) file. |
Import |
Import test cases and test case values from a character-delimited text file, such as comma-separated values (csv) file. |
Copy Link to Clipboard |
Copies a link to the test to the clipboard. You can send this information to another user, who can use the Window, Quick Open feature to open the test without having to navigate to it in PTF Explorer. |
Validate Test |
Validate the test against the application metadata to identify changes in the metadata since the test was last modified. As you modify a test based on the results of a test maintenance report, you can validate the test by running a test maintenance report. The report is generated for a single test, using analyses of compare reports generated in Step 2 of the Test Maintenance Wizard. |
Check Syntax |
Validates the parameter syntax and values. |
Run |
Runs the current test. |
Run from Step |
Runs the current test from the specified line number. |
Pause |
Pauses execution of the test. |
End |
Stops execution of the test. |
Open Test Recorder |
Launches the Test Recorder. |
The Test Editor Edit menu contains standard Microsoft edit commands, such as Cut, Copy, Paste, and Delete, and the following PTF commands:
This table lists the additional PTF commands:
Edit Menu Command |
Usage |
---|---|
Find |
Finds occurrences of a specific text string in the current test. Select the List all Matching Steps check box to create a list of matches. |
Again |
Searches for the Find string again. |
This table describes Test Editor Debug menu commands:
Debug Menu Command |
Usage |
---|---|
Step Into |
Executes the current step of the test and advances to the next step. |
Step Over |
Executes the current step of the test and advances to the next step, unless the next step calls another test. Steps over called tests. |
Toggle Break |
Sets a break point at the selected step or removes an existing breakpoint. |
Clear All Breaks |
Removes all break points. |
Stop on Error |
Stops execution if the test encounters an error. |
Disable Screen Shots |
By default, the recorder creates a screen shot with each error. Select this option to save space in the log by not creating screen shots. |
Highlight Errors |
Highlights errors in the log in yellow. |
Overwrite Log |
If a log window is open after the most recent execution of a test, you can choose whether to append to the open log or overwrite the open log. Select this option to overwrite the open execution log. |
Leave Browser Open |
Keeps the PTF-launched browser window open after executing a test, to assist with debugging. Be aware that if many tests are executed with this option enabled, performance may degrade as the webdrivers used by PTF consume memory. Use the Kill Leftover Drivers option if performance is impacted. |
Kill Leftover Drivers |
Closes open Test Framework browser windows, to release the memory that is used by their associated webdrivers. When the Leave Browser Open option is enabled, if performance issues arise, you can use Kill Leftover Drivers at any time to free up memory. |
This table discusses the Test Editor Window menu commands:
Window Menu Command |
Usage |
---|---|
Quick Open |
Using information from the Copy Link to Clipboard command, quickly opens a test without having to navigate to the log in PTF Explorer. You can also use this menu command to search for and open multiple tests. test cases, or text execution logs. |
Close All |
Closes all windows. |
In addition to buttons for the standard Microsoft cut, copy, and paste commands, the test editor toolbar provides the following functions:
Field or Control |
Definition |
---|---|
Check Syntax |
|
Run test. |
|
End test. |
|
Show Test Recorder. |
|
Debug break. |
|
Step into. |
|
Step over. |
|
Stop on error. |
|
Disable screen shots. |
|
Highlight errors in the execution log. |
|
Overwrite the open execution log. |
|
Specify text that will be added to text fields when the test is executed. The prefix text is substituted for the #PREFIX# reserved word in the Value field. Using a prefix can help prevent an error caused by a duplicate entry when the page is saved. |
You can have multiple tests open in PTF. Each test has its own test window. This example shows a Test Editor test window:
The following fields appear in the test window:
Test Information Fields
Field or Control |
Definition |
---|---|
Name |
Displays the test name. This field is display-only. |
Description |
Brief description of the test. You can enter a detailed description in the Comments. |
Test Information Functions
Field or Control |
Definition |
---|---|
Test Save As. |
|
Click to access the Message Recognition dialog box. Use the Message Recognition dialog box to define how PTF will respond to messages that are encountered during execution of the test. The Message Recognition icon contains a check mark when the message recognition is enabled for the test. |
|
Open the Test Properties dialog. In the Language field, select the language for the PeopleSoft application. The default is English. Changing the value in the Language field only affects the language the test selects at sign in. It does not enable the test to execute against a different language. PTF tests should be executed against the same language in which they were recorded. Select the Variable Action to use with this test. The variable action determines whether or not to use persistent variables. By default the action is set to None and persistent variables are not used. See Using Persistent Variables Select the Library Test checkbox to make the test a library test. See Using Library Tests. |
|
Open the Test Comments dialog. You can enter a long description of the test using Rich Text and add images. Click the take Snapshot icon in the Comment dialogue to insert a screenshot. |
Test Case Information Fields
Field or Control |
Definition |
---|---|
Name |
Displays the name of the current test case. You can select a different test case using the drop-down list. When you create a test, the system automatically associates it with a test case named DEFAULT. |
Description |
Brief description of the test case. You can enter a detailed description in the comments. |
Test Case Information Functions
Field or Control |
Definition |
---|---|
Test Case Save As. |
|
Create a new test case. |
|
Delete the selected test case. |
|
Open the Test Case Properties dialog. |
|
Open the Test Case Comments dialog. You can enter a long description of the test case using Rich Text and images. |
In addition to buttons for the standard Microsoft cut, copy, and paste commands, the test window toolbar provides the following functions:
Field or Control |
Definition |
---|---|
Selects the Active check box for all steps. Click the drop-down arrow for additional step activation options, including:
|
|
Inserts a new, blank step below the current step. Click the drop-down arrow to insert the new step above the current step. |
|
Deletes the current step. |
|
Displays the Step Information dialog box showing the PeopleTools metadata associated with the object referenced in the step. See Using Step Information for more information. |
A PTF test consists of a series of steps. Each step in a test is composed of the following fields:
Field or Control |
Definition |
---|---|
Seq (sequence) |
A system-generated sequence number. Test steps execute according to Seq order. When you move, add, or delete a step, Seq is refreshed. |
ID |
A system-generated unique identifier for each step in a test. This value does not change when you move, add, or delete a step. Test maintenance reports use the ID value. |
Comment |
When you click on the comment icon in the comment field a rich text editor opens that enables you to add detailed comments for each step. The comment field is gray when it contains a comment. |
Active |
Deselect this field to inactivate a step. PTF will skip inactive steps when the test runs. PTF syntax check is also skipped on inactive steps. Each step is active by default. This field is grayed for inactive steps. |
Scroll ID |
This field is only required for scroll handling. |
Type |
The step type. Often, the step type corresponds to the type of application object the step is to take an action on or to validate, such as Text, Check box, Browser, and so on. Other step types perform certain functions, such as executing a test or query, setting a variable, or performing conditional processing. |
Action |
The action the test is to take . Each step type has a set of associated actions. The two most common actions used with a Text step type, for example, are Set and Verify. |
Recognition |
The means that PTF uses to identify the HTML object within the application. Often, this is the HTML ID property. |
Field Label |
Contains the label text of the page control referenced in the Recognition field. The value for the Show Field Label option in the Local Options dialog box determines whether this column appears:
For more information about setting local options, see Configuring Local Options. |
Parameters |
The conditions that apply to this specific step, if applicable. Note: This field was introduced in release 8.54; in previous releases, parameters were specified as part of the Recognition field. When you load and save a test from release 8.53 or lower, PTF automatically moves any parameters from the Recognition field to the Parameters field. |
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 checked. Value is part of the test case, not the test itself. |