JavaScript Definition

The following is intended to help understanding of the execution environment that is used to evaluate the JavaScript definition of your test case.

The test code you provide is used to generate a test configuration containing a description of your targets, arrival phases as well as test scenarios and steps.

JavaScript Environment

The JavaScript definition that is used to describe the test case is executed only ONCE by our API when saving your test case or uploading via the forge CLI tool. There is no JavaScript being executed when a test is running. This means the JavaScript is executed once before you actually run a test case and without any concrete test data or other state. Functions like getVar() or session.ds.generateFrom() return internal placeholders that will be replaced during the actual test run execution later. You can use helpers like session.if() or session.times() to control the flow of your sessions.

Note that the JavaScript environment is a minimal environment, so you will not find any browser APIs (like window or navigator) nor any other system APIs like in a Node.js context. It is also not possible to load any external JavaScript libraries.

JavaScript DSL

Inside the JavaScript definition you can define your test case by interacting with the global definition variable that is provided.

See the following articles for the various elements you can define via the API:

See Other

Icon Support Are you stuck? Or do you have any feedback? Get in touch with us – we are happy to help you.
Icon Schedule a demo Schedule a personal, customized demo. We'll show you around and introduce you to StormForger.
Icon Talk to a human To build and run reliable applications is complex – we know. Schedule a call and we’ll figure things out.

We are using cookies to give you the best online experience. If you continue to use this site, you agree to our use of cookies. By declining we will disable all but strictly required cookies. Please see our privacy policy for more details.


Accept Decline