We value your privacy
We use necessary cookies to make Loadero work. We ask for your permission to set additional cookies to understand site usage, make site improvements and to remember your settings. We also use cookies set by other sites to help deliver content from their services. See Cookie Policy for more info.
Skip to main content

Framework information

Loadero supports writing the test script in the following frameworks to simulate participant actions:

You will be prompted to select one of these frameworks when creating a project.

Project language selection

The project language can later be changed any time in the project settings.

caution

Project language is a project-wide setting, it is not test-specific. If you have set the project language to be JavaScript + Nightwatch.js, and create a test with a Java + TestUI script, then when executing the test, the run will fail horribly due to perceived syntax errors, as the test will be attempted to be executed as a JavaScript + Nightwatch.js test.

It is possible, but not recommended, to have tests of different languages in one project, as you would have to switch the project language to the necessary one before launching a test every time.

In addition to the built-in commands in these frameworks, the Loadero team has implemented multiple additional custom commands that are at the user's disposal.

Available third party tools

Additional tools are pre-installed and available for use in the script. You do not have to add any import statements to the script, these imports are already handled in the background. Select the tab of the framework you are interested in to see the relevant tools.

When scripting in Nightwatch.js, you will have access to the following tools:

  • Node - v14.18.3
    • The crypto module is pre-imported and can be used immediately.
    • Other built-in Node modules have to be imported manually within the script (example provided below).
  • The following NPM (v6.14.15) packages come pre-imported and can be used immediately. NPM packages not listed here will not be available for use within the script.
No import needed, can be called immediately
client => {
// No import required, axios can be called immediately
axios
.get('https://petstore.swagger.io/v2/user/login?username=randomUser&password=superSecure')
.then((response) => {
console.log("API Response:", response.data)
});
// A pause to keep the test running long enough for the logging to complete
client
.pause(5*1000);
}
Most Node.js packages must be imported within the script
client => {
// Import the url module from Node.js
const url = require('url');

client
.url("https://bing.com")
.getCurrentUrl((result) => {
console.log('Current URL:', result.value);

// Parse the URL using Node's 'url' module
const parsedUrl = url.parse(result.value);

// Log parts of the parsed URL
console.log('Protocol:', parsedUrl.protocol);
console.log('Host:', parsedUrl.host);
console.log('Pathname:', parsedUrl.pathname);
console.log('Params:', parsedUrl.search)

// Identify each individual param
const params = parsedUrl.search.substring(1).split("&");

// Assert that params equal/match expected values
client.assert.strictEqual(params[0], "toWww=1", "toWww param is equal to 1.");
client.assert.match(params[1], /redig/), "redig param has a value";
});
}
info

If you require access to other packages/imports, reach out to our team and we will see if we can make it available within the Loadero environment.

Available imports from the framework

While the section above details third-party tools, this section lists framework-specific imports that you are able to use in your scripts. These imports are available immediately and do not need to be imported via an import statement within the test script.

There are no imports available from Nightwatch.js.