Playing Back the Script

This chapter provides an overview of script playback and discusses how to:

Click to jump to parent topicUnderstanding Script Playback

You can play back the script at any point, regardless of whether you are finished writing commands.

Oracle's JD Edwards EnterpriseOne Autopilot offers these options for playing back the script:

You can stop playback at any time by selecting Stop from the Play menu or by clicking the Stop button on the toolbar.

You can script wait periods during playback. When you script a wait period, the playback stops for a length of time that you specify, and then it resumes.

You can configure playback by selecting Options from the Tools menu and selecting the Playback tab. For example, you can set JD Edwards Autopilot to capture and display the results of a playback session. The results are presented as an event stream: a time-stamped, chronological record of each JD Edwards Autopilot and JD Edwards EnterpriseOne software event that occurs during the session.

When you play the script, JD Edwards Autopilot stops the playback if an error occurs in the software. If you have configured playback to save and display test results, appears in the Test Results form to indicate the playback was unsuccessful. If JD Edwards Autopilot encounters no errors during playback, it displays a message indicating success.

Click to jump to parent topicConfiguring Automatic Script Playback

This section provides an overview of automatic script playback and discusses how to:

Click to jump to top of pageClick to jump to parent topicUnderstanding Automatic Script Playback

At any time, you can set or change the script playback configuration to have JD Edwards Autopilot play back certain features without your intervention. To configure script playback, you use the Options form, which you access by selecting Options from the Tools menu in the JD Edwards Autopilot window.

Click to jump to top of pageClick to jump to parent topicUsing Play Back During Script Creation

When you select the Play Back while Creating Script option, JD Edwards Autopilot plays each command after you insert it in the script. To write a script without any delay caused by script playback, you should clear this option. Alternatively, to observe each command that you script, select this option.

Click to jump to top of pageClick to jump to parent topicStoring and Displaying Playback Data

JD Edwards Autopilot enables you to store and display the results of each script playback. If you save results data, JD Edwards Autopilot saves script playback results as a binary large object in table F97214. If you display test results after playback, JD Edwards Autopilot automatically displays the Test Results form after playback. This form contains tabs that you use to review additional information about script playback.

If you select to save script playback results, you can view a history of playback results by selecting Results from the Tools menu.

See Also

Understanding Script Reporting

Click to jump to top of pageClick to jump to parent topicHandling Breakpoints

A breakpoint is a point in the script that halts playback until you manually continue it or cancel it. To play the script uninterrupted but keep any breakpoints that you have inserted, select the Ignore Breakpoints during Playback option.

Click to jump to top of pageClick to jump to parent topicSetting Playback Speed

If you select the Accelerated Playback option, the system notifies JD Edwards Autopilot as soon as processing is complete so that playback can immediately continue. In general, you should select this option only when you are running relatively simple scripts that do not require the system to perform a large amount of processing.

Click to jump to top of pageClick to jump to parent topicSetting the Cancel Playback on Comm Error Option

If you select the Cancel Playback on Comm Error option, and you experience software communication issues, JD Edwards Autopilot cancels the current script. If you do not select the Cancel Playback on Comm Error option, JD Edwards Autopilot attempts to complete the script.

Click to jump to top of pageClick to jump to parent topicSetting the Log Variables on Script Failure Option

If you select the Log Variables on Script Failure option, JD Edwards Autopilot logs the final values of all variables in the event of a script failure.

When a script fails, the system writes the current value of variable assignments to the JD Edwards Autopilot results output. You use this output to analyze script failures. In the results database, you can view variable contents and immediately draw conclusions about the cause of a script failure. For example, the journal date variable value of 06/03/02 causes the script to fail if the year is not 2002. This is typical of the variable data that you might view. It is recommended that you select this option.

Click to jump to top of pageClick to jump to parent topicSetting Event Stream

The term event stream refers to the flow of information from the software to JD Edwards Autopilot that occurs during playback. You select one of these options to configure script playback to capture this information:

Click to jump to parent topicUsing Manual Script Playback Options

This section provides an overview of manual script playback options and discusses how to:

Click to jump to top of pageClick to jump to parent topicUnderstanding Manual Script Playback Options

After you configure script playback, you run playback using the Command menu or the playback buttons on the toolbar. You can play the script from the top without interruption, play the script from any selected spot to the end, play only a selected branch of the script, play back the script one command at a time, play the script to a breakpoint, or stop playback. You can insert wait periods in the script to delay playback for a set period of time before it resumes, or you can manually stop and resume script playback.

Click to jump to top of pageClick to jump to parent topicUsing the Play from Top Option

When you select Play from Top in the Play menu, script playback begins with the first command line and continues until the end of the script unless JD Edwards Autopilot encounters an error.

When you use this or any of the other playback functions, you can stop the playback by clicking the Stop button on the toolbar. Before you play back the entire script, remove any breakpoints that you inserted in the script.

Click to jump to top of pageClick to jump to parent topicUsing the Play from Cursor Option

The Play from Cursor option enables you to select any spot in the script and then play the script to completion, if JD Edwards Autopilot does not encounter an error or a breakpoint.

Click to jump to top of pageClick to jump to parent topicUsing the Play Branch Option

The Play Branch option enables you play only a single script node that consists of one or more context commands and a series of action commands.

Click to jump to top of pageClick to jump to parent topicPlaying the Script from a Selected Line Command

To manually control playback from a chosen point in the script, you select the Stepping On option. You can play back either from the top, from a selected cursor position, or from a chosen branch of the script. You can then play the script a line at a time or from breakpoint to breakpoint.

Click to jump to top of pageClick to jump to parent topicPlaying the Script to the Next Line Command

After you select Stepping On and select to play back either from the top, from a selected cursor position, or from a selected branch, you select the Step Next option to play the script one command line at a time. Script playback then proceeds step by step as you click Step Next or Continue To Breakpoint on the toolbar or Play menu.

Click to jump to top of pageClick to jump to parent topicToggling a Breakpoint

A breakpoint is a command line that you select to stop playback until you resume or cancel playback. You can insert as many breakpoints in the script as you need. This enables you to isolate areas of the script and observe the playback.

You toggle the breakpoint by right-clicking the line in the script where you want playback to break and selecting Toggle Breakpoint. You can script multiple playback breakpoints. Script execution is suspended at each breakpoint unless Ignore Breakpoints is selected. Another way to stop JD Edwards Autopilot script execution is by clicking the Stop button. While the use of breakpoints allows script execution to be resumed later, clicking the Stop button ends the playback session.

Click to jump to top of pageClick to jump to parent topicUsing Wait Before Proceeding

You use the Comment/Wait option to script waiting periods, or pauses, in the playback. You can insert one or more wait commands anywhere in the Script pane. After the prescribed wait period has elapsed, playback resumes without your intervention. You can specify the duration of the wait. You can insert waits in the script that are of sufficient duration to simulate the amount of time required to actually enter data in a header or detail area.

Enter comments in the Comments field. Enter the period to wait in the Time (mSec) field. Enter the time in milliseconds. For example, if you want a 30 second pause, enter 30000.

Click to jump to top of pageClick to jump to parent topicUsing Script Comment

Using the Comment/Wait option, you can write brief comments that, for example, explain the reason for a Wait command. If you exchange scripts with someone else, you can use the comments to explain the actions that occur at a particular point in the script or to explain what the script is designed to test. You type a comment in the Comment field in the command pane and insert it in the script.

Note. JD Edwards Autopilot truncates the comment in the Script pane at 54 characters, including spaces.

JD Edwards Autopilot also enables you to cut or copy comments from other scripts or from other documents and paste them into the Comment field of the command pane. For example, if a comment that you insert in one script is applicable to several other scripts, you copy that comment and paste it into other scripts.

When you select the Comment/Wait option from the Command menu, the command pane also displays these options:

Select the Wait until message window is closed option if the script clicks the Delete button in a form. If you select the option, JD Edwards Autopilot does not proceed with script playback until it has clicked OK on the Confirm Delete form.

Select the Log To Test Manager option if you plan to include a script as part of batch testing. You use the Test Manager tool to assemble script playlists for batch playback. If you select the Log To Test Manager option, the comments that you insert in a script are sent to Test Manager and included in a report after playback.

Select the Fail Script option if a critical event in the script caused the script to fail. If you select this option, JD Edwards Autopilot automatically fails the script at the point where you insert the command.

If you fail the script, JD Edwards Autopilot inserts a comment symbol in red.

You can use the Fail Script option in conjunction with logging comments to Test Manager by selecting both options. When you run a batch test, JD Edwards Autopilot fails the script and generates a summary report in Test Manager that lists any comments that you include about the failure.

See Also

Understanding Script Testing

Click to jump to top of pageClick to jump to parent topicIgnoring Breakpoints During Playback

You can preserve breakpoints that you have inserted in the script, but run the script one or more times without breakpoints. Rather than toggle the breakpoints on and off, you can select the Ignore Breakpoints during Playback option. When you want to run the script to the breakpoint that you designated, clear the Ignore Breakpoints during Playback option and play back the script.

Click to jump to top of pageClick to jump to parent topicStopping Playback

At any point during playback, you can stop the process by selecting the Stop option in the Play menu or by clicking the Stop button on the toolbar. If the script is playing, the Stop button appears red. When you click the Stop button, JD Edwards Autopilot records a Script Playback Canceled message, and the Stop button appears gray.

Click to jump to parent topicRunning Script Playback

This section provides an overview of script playback and discusses how to:

Click to jump to top of pageClick to jump to parent topicUnderstanding Script Playback

You run the various script playback functions in JD Edwards Autopilot using the options in the Play menu or the playback buttons on the toolbar. You can also use the Comment/Wait option to script one or more pauses in the playback and to insert comments in selected command lines in the script or as standalone lines. In addition, you can right-click a command line in the Script pane to toggle a breakpoint on and off.

Ignoring Breakpoints in the Script

You can ignore breakpoints that you activate in the script if you want to play back the script without interruptions but do not want to clear the breakpoints. To do so, select the Ignore Breakpoints option from the Play menu. If you need to stop playback at the breakpoints, select the Ignore Breakpoints option again to disable it.

Inserting a Comment in the Script

You can also use the Comment/Wait option to insert into the Script pane comments about the command line that you chose or general comments about the script, including its purpose. To include the script in the batch testing that Test Manager runs, and you want the comments to appear in a summary report after batch testing, select the Log To Test Manager option.

Click to jump to top of pageClick to jump to parent topicPlaying the Script from the Top

Before you play the script from the top, close all open JD Edwards EnterpriseOne applications. To avoid interference between JD Edwards Autopilot and JD Edwards EnterpriseOne, do not type on the keyboard or click a JD Edwards EnterpriseOne window while a script is executing unless you want to intentionally change the course of the script execution.

Note. Simply moving the mouse will not affect the execution of a script, nor will clicking anywhere in the JD Edwards Autopilot window.

To play the entire script from the top, in the Script pane of the JD Edwards Autopilot window, verify that you have completed these steps:

  1. Remove any breakpoints or select Ignore Breakpoints from the Play menu.

  2. Disable the Stepping On button.

  3. In the Play menu, select the Play from Top option.

    Note. You can also start the playback process by pressing the F5 key on the keyboard.

Click to jump to top of pageClick to jump to parent topicPlaying the Script from a Particular Cursor Position

You use the Play From Cursor option to begin playback from the position of the cursor, rather than from the top of the script. Before you play back the script from cursor, ensure that the JD Edwards EnterpriseOne software is open to the appropriate place. For example, if you are starting playback on a particular form, ensure that the form is open.

To play back the script from a particular cursor position:

  1. In the Script pane in the JD Edwards Autopilot window, select a command line from which you want to play back the script.

  2. Select the command line.

  3. In the Play menu, select the Play From Cursor option.

Click to jump to top of pageClick to jump to parent topicPlaying a Branch of the Script

You can use the Play Branch feature to play a selected branch of a script. JD Edwards Autopilot plays the selected node in the script and all nodes subordinate to it. Coincidentally, the insertion cursor always marks the endpoint of branch execution.

To play a branch of the script:

  1. In the Script pane in the JD Edwards Autopilot window, select the first command line in a branch.

  2. In the Play menu, select the Play Branch option.

Click to jump to top of pageClick to jump to parent topicPlaying the Script to the Next Command

After you select the Stepping On option, you select a command line from which to play back the script–from the top, from a branch of the script, or from a particular cursor position. You can then play the script one line at a time or until the next breakpoint.

To play the script back one line at a time:

  1. In the Script pane in the JD Edwards Autopilot window, select a command line from which you want to play back the script.

  2. In the Play menu, select the Stepping On option.

  3. In the Play menu, select one of these buttons:

  4. To proceed to the next line, click Step Next.

  5. To play to the next breakpoint in the script, click Continue to Breakpoint.

  6. To discontinue the playback, click Stop.

Click to jump to top of pageClick to jump to parent topicToggling a Breakpoint

To have the script play only to a predetermined command line in the script, you can toggle a breakpoint by highlighting it and then right-clicking the command line at which you want playback to break. You can toggle as many breakpoints as you like. For example, you might toggle a breakpoint when you have created a lengthy script and want to play back only a portion of it rather than the entire script.

When you toggle a breakpoint and then play back the script, the playback proceeds to the line on which you set the breakpoint, and then it halts until you either stop playback or continue it to another breakpoint. You can also select and right-click a command line to remove a breakpoint.

To toggle a breakpoint:

  1. In the Script pane of the JD Edwards Autopilot window, select a playback breakpoint by selecting a line in the script.

  2. Right-click.

  3. Select the Toggle Breakpoint option.

    JD Edwards Autopilot inserts the breakpoint to the script.

  4. To remove the breakpoint, select a command line where you entered a breakpoint.

  5. Right-click.

  6. Select the Toggle Breakpoint option.

    JD Edwards Autopilot removes the breakpoint.

Click to jump to top of pageClick to jump to parent topicPlaying the Script to a Breakpoint

After you have toggled a breakpoint, you can play back the script, either from the top or from a particular cursor position. When JD Edwards Autopilot reaches the command line that contains the breakpoint, playback halts. However, JD Edwards Autopilot does not cancel playback. To continue scripting, or to play back the script differently, you must click the Stop button to cancel playback.

To play the script to a breakpoint:

  1. In the Script pane in the JD Edwards Autopilot window, toggle a breakpoint in the script.

  2. In the Play menu, select the Play from Top option.

  3. If the script plays to the breakpoint and you want to continue scripting, toggle off the breakpoint.

  4. In the Play menu, select Stop.

Click to jump to top of pageClick to jump to parent topicContinuing Playback to a Breakpoint

After you toggle one or more breakpoints and select stepping, you can play the script back from breakpoint to breakpoint by clicking the Continue to Breakpoint button on the toolbar.

To continue playback to a breakpoint:

  1. In the Script pane in JD Edwards Autopilot, select a playback breakpoint by selecting a line in the script.

  2. Right-click.

  3. Select Toggle Breakpoint to insert the breakpoint in the script.

  4. Select a point in the script where you want to play back the script.

  5. In the Play menu, select the Stepping On option.

  6. Click the Play from Cursor To End Of Script button.

  7. Click Continue to Breakpoint.

    Note. You can set as many breakpoints in the script as necessary and click Continue to Breakpoint each time that playback reaches one.

Click to jump to top of pageClick to jump to parent topicIgnoring Breakpoints During Script Playback

Access the JD Edwards Autopilot window.

  1. In the Script pane, toggle on one or more breakpoints in the script.

  2. Click the Ignore Breakpoints button on the JD Edwards Autopilot toolbar.

Click to jump to top of pageClick to jump to parent topicInserting a Wait Command in the Script

If you insert a breakpoint in the script, playback halts when JD Edwards Autopilot reaches the breakpoint. Playback does not resume or stop without your intervention. Alternatively, if you select Comment/Wait in the Command menu, you can script a specified wait period, or pause, at a predetermined script command line. When the playback reaches this command line, the wait occurs, and then playback proceeds.

To insert a Wait command in the script:

  1. In the Script pane in the JD Edwards Autopilot window, select a command line in the script.

  2. In the Command menu, select the Comment/Wait option.

  3. Press the Tab key or place the cursor in the unpopulated Time (msec) list.

  4. Type a time, in milliseconds, for the wait.

    Note. Do not use commas when you type the time of the wait.

  5. Click the Insert button.

  6. Run a playback command.

Click to jump to top of pageClick to jump to parent topicFailing a Script

You can automatically fail a script by activating the Fail Script option. This option appears in the command pane when you click the Comment/Wait button. Activate the Fail Script option to include the script in a batch that Test Manager runs.

To fail a script:

  1. In the Script pane of the JD Edwards Autopilot window, place the insertion cursor at the point that you want to fail the script.

  2. In the Command menu, select Comment/Wait.

  3. In the command pane, select the Fail Script option and click the Insert button.

    JD Edwards Autopilot inserts a red comment symbol in the Script pane to indicate that the script fails at that point.

Click to jump to top of pageClick to jump to parent topicSetting Transaction Times in the Script

A transaction is a series of events, bounded by a start and end point. You can insert comments in the script to measure playback transaction time. Setting transaction times in the script provides important information about the time that the software requires to run a series of commands. Although these transaction times have no meaning within JD Edwards Autopilot, they are used by the JD Edwards Virtual Autopilot tool to analyze application performance. Creating a transaction in a JD Edwards Autopilot script causes an entry to be written to the results data, which can be imported into JD Edwards Virtual Autopilot for analysis.

Important! JD Edwards Virtual Autopilot requires a JD Edwards EnterpriseOne Windows client. You can use JD Edwards Virtual Autopilot with JD Edwards EnterpriseOne Tools 8.97 and JD Edwards EnterpriseOne Applications 8.10 and prior. You cannot use JD Edwards Virtual Autopilot with JD Edwards EnterpriseOne Applications 8.11 and later releases, as these releases are on a web client only.

You use the Comment/Wait option to assign a name to the transaction, to insert a starting point (such as launching an application), and to insert a finishing point (such as closing the program).

 

To set transaction times in the script:

  1. In the Script pane of the JD Edwards Autopilot window, determine the command line that represents the start of the transaction, and then place the insertion cursor directly below it.

  2. In the Command menu, select the Comment/Wait option.

  3. In the unpopulated Comment list of the JD Edwards Autopilot command pane, enter Start, press Spacebar, and then enter a name for the transaction.

  4. Click the Insert button.

    JD Edwards Autopilot inserts a command line that marks the start of the transaction.

  5. Determine the command line that represents the end of the transaction, and then place the insertion cursor after it.

  6. In the Command menu, select the Comment/Wait option.

  7. In the unpopulated Comment list of the JD Edwards Autopilot command pane, type End, press Spacebar, and type the name of the transaction.

    JD Edwards Autopilot inserts a command line that marks the end of the transaction.

    Note. The name that you assign to the end of the transaction must exactly match the name that you assign to the start of the transaction.

  8. Click Insert.

Click to jump to top of pageClick to jump to parent topicInserting a Comment in the Script

Access the JD Edwards Autopilot window.

  1. In the Script pane, place the insertion cursor at the point in the script in which you want the comment to appear.

  2. In the Command menu, select the Comment/Wait option.

  3. In the unpopulated Comment list of the JD Edwards Autopilot command pane, type a comment.

  4. Select the Log to Test Manager option to have JD Edwards Autopilot include the comment in a summary report after testing.

  5. Click Insert.

See Also

JD Edwards EnterpriseOne Tools 8.97 Virtual Autopilot Guide