Moropo uses Maestro's GraalJS engine to execute JavaScript steps inside your tests.

This provides a similar JavaScript environment to NodeJS.

Note: it's not currently possible to import node_modules

Creating a script

Add or upload a script directly from the Test Editor

Execute a script

Use the runScript command to call a script during a test run.

Using Variables

output is a special JavaScript object which is shared by each test run and can be used to store variables for use in your tests.

For example, I could set inside my JavaScript file called get name: = 'billy'

In my test, I can then access this by calling runScript and then using ${} to access the variable.

For example:

IMPORTANT NOTE Moropo does not currently persist JavaScript data between 'plays' in the Test Editor If a step requires a data set by JS, you must also select the dependent step when playing that step.

For example, in the below case step 3 requires a variable set by step 2. Every time I wish to play step 3, I must also select step 2.

Making HTTP Requests

You can make HTTP requests using the built-in library.

For example, to make a simple GET request, filter the data, and save it to a variable:

const response = http.get(""); = json(response.body).find(user => === 2).name

HTTP request methods

  • http.get("")


  • http.put("")

  • http.delete("")


Headers can be passed using the headers parameter

const response = http.get('', {
    headers: {
        Authorization: 'Bearer myToken'

JSON parsing

Use the json() built-in helper function to parse JSON responses.

const response = http.get("");
const users = json(response.body);
// users = [
//   { id: 1, name: "Clive" },
//   { id: 2, name: "Barbie" }
// ] = users.find(user => === 2).name;
// = Barbie

Last updated