Managing Global Scripts
Introduction
The Scripts application enables you to create and maintain global, reusable scripts for the purpose of Test Case execution and other test data processing. We support the following types of entries in the application:
- ASTER Scripts 
- JSON Files 
- XML Files 
- Plain Text Files 
- Regular Expressions (POSIX runtime engine based on SAP ABAP 7.40 implementation) 
- XPath Expressions (XPath 1.0 runtime engine based on SAP ABAP 7.40 implementation) 
- XSLT Transformations (XSLT 1.0 runtime engine based on SAP ABAP 7.40 implementation) 
You can launch the application from the Fiori Launchpad, located under the API Tester tile group.

Locating the Scripts application in API Tester group in Fiori Launchpad.

Initial screen of Script editor with the list of scripts.
Purpose
The Scripts application enables creation, testing and manipulation of various scripts and files. Specific support is provided for ASTER scripts, XSLT transformations, XPath expressions and Regular Expressions. Certain scripts and files defined in this application may be also used in another places of the Int4 Suite.
ASTER Scripts
ASTER scripts built in the Scripts application may be utilized in the following places:
- Automation Object Variable Processing 
- Automation Object Payload Processing 
- Automation Object Custom Validations 
Any Script
Any script maintained in the application may be loaded as text or imported and parsed during ASTER script execution using LOAD or INCLUDE functions accordingly. For this, the script unique name should be provided as the function parameter. Read more about this feature in the ASTER Documentation.
Script Creation
In order to create a new entry, click on the  button and complete the dialog, giving the script a unique name, select type and optionally provide description.
button and complete the dialog, giving the script a unique name, select type and optionally provide description.

Script application dialog for new script creation.
Once the script is created - after system validates unique script name - the application takes You to the script editor.
Script Editor
The script editor screen is divided into several sections that aid developers and testers in design and validation of the script objects. Availability of these sections is driven by the type of the script being edited.

Script Editor screen with specific sections highlighted
| Section | Purpose | Availability | 
|---|---|---|
| 1 | Display script name and type | Always | 
| 2 | Main controls: Edit, Save, Cancel Edits, Run | Run available only for runnable scripts (XSLT, XPath, Regex, ASTER) | 
| 3 | Test Case Selection Direct source of data for ASTER scripts. Helper for other scripts type to populate the Sample Data. | Available only for runnable scripts (XSLT, XPath, Regex, ASTER) For XSLT, XPath and Regex it is possible to copy input and first of the output payloads from the selected test case into the Sample Data Section | 
| 4 | Sample Data Section This section enables additional data input for processing by the script (e.g. XML for XSLT Transformations) | Available for XSLT, XPath, Regex ASTER Scripts do not accept arbitrary inputs, data would be provided by the execution context, which can be controlled by selecting a Test Case on the left hand side of the editor | 
| 5 | Main Editor Screen | Always Syntax highlighting is provided for ASTER, XML, XSLT, JSON, and in a limited way for XPath Reference help (link in the top right) is provided for all structured formats. In ASTER mode, the editor offers advanced helpers for Autocompletion and Function Suggestions with short description of it’s role and parameters | 
| 6 | Script Execution Output This section will present execution result, e.g. output of XSLT processing or results found by running a Regular Expression | Available only for runnable scripts (XSLT, XPath, Regex, ASTER) In case the output is detected by heuristics as JSON or XML, the Output section will offer a “Format view” link that allows simple output formatting for readability | 
| 7 | Messages Output | Available only for runnable scripts (XSLT, XPath, Regex, ASTER) Processing messages will be shown here. For ASTER script execution analysis, data provided to DEBUG and LOG_MESSAGE functions will also output in this section | 
