JavaScript Test Editor
The JavaScript Test Editor dialog box specifies the information that Arbortext Publishing Engine Test Utility passes to the JavaScript application. You can access this dialog box in either of two ways:
• Choose a JavaScript test in the Test List dialog box, and then click Edit Test.
• Choose JavaScript in the Test Type dialog box.
Refer to Programmer's Reference and Programmer's Reference for detailed information on creating custom JavaScript applications.
You can specify the following parameters in the JavaScript Test Editor:
• JavaScript Function Name — Specifies the name of the function to be called. This read-only field derives its content from the Value field of the function query parameter.
• Protocol — Specifies the HTTP version that the Arbortext Publishing Engine Test Utility passes in the E3ApplicationRequest object to the JavaScript code.
• Edit URI — Opens the Modify URI dialog box in which you can specify the URI values that the Arbortext Publishing Engine Test Utility passes in the E3ApplicationRequest object.
• Get — Indicates the request is an HTTP GET.
• Post — Indicates the request is an HTTP POST. Specify the file to be included in the message body in the Input File field. Click Browse to navigate to an existing file.
• Query String — Allows you to create, edit, or delete name=value pairs to pass to the JavaScript function. Click New to add a new name=value pair in the New Value dialog box. Click Edit to edit a name=value pair in the Modify Value dialog box.
|
You cannot change the name in a name=value pair in the Modify Value dialog box. Instead, you must delete the name=value pair and then create a new name=value pair.
|
The value of function populates the JavaScript Function Name field. This value must be the name of the JavaScript function being called. All other name=value pairs are parameters specific to the JavaScript function.
|
You must specify the function name in the list of allowed functions that Arbortext Publishing Engine can use. For more information on allowed functions, refer to the Configuration Guide for Arbortext Publishing Engine.
|
• HTTP Headers — Allows you to create, edit, or delete HTTP header name=value pairs. Arbortext Publishing Engine Test Utility passes these parameters to the JavaScript function.
Click New to add a new HTTP header name=value pair in the New Value dialog box. Click Edit to edit the value of a HTTP header name=value pair in the Modify Value dialog box.
|
You cannot change the name of an HTTP header in a name=value pair in the Modify Value dialog box. Instead, you must delete the HTTP header name=value pair and then create a new name=value pair.
|
See the Hypertext Transfer Protocol — HTTP/1.1 standard on the World Wide Web Consortium web site for detailed information on valid Header Field Definitions:
The buttons on the JavaScript Test Editor are described as follows:
• Run — Runs the selected test. If errors were detected, the Error window displays. If the test ran successfully, the Results window displays.
|
Server errors are returned in the Results window, not the Error window.
|
• View Results — Opens the Results window if the selected test ran successfully.
• Validate — Validates the HTTP request syntax for the selected test. It does not check the validity of the application being tested. The Error window displays if errors were detected.
• View Errors — Opens the Error window if errors were detected in the selected test.