A JavaScript action may be added to a Virtual User definition. A JavaScript action is identified by a name and a description and contains the script to be executed.
NeoLoad creates the action using a skeletal script, which may be either modified or deleted entirely to create a new script.
Any change made to a script during the editing process must be validated for them to be applied. Alternatively, changes may be canceled prior to validation, in which case the last script version saved will be reloaded. Scripts may be edited directly in the project files (scripts
directory).
A click on the Reload button allows reloading the content of the edited file into NeoLoad.
The JavaScript scripts can be compiled prior to run them. A click on the Open button starts the Operating System editor associated to the .js
extension. Compiling checks the script syntax (missing parentheses...) but not its validity (method names ...).
During a test, a JavaScript action will be flagged as an error in the following cases:
context.fail(message)
method.JavaScript actions are systematically displayed during the User Path checking process and will appear in the error table if the script has been error-flagged.