Suitest JavaScript API v2

This part of user documentation is describing an obsolete version 2.5.* (or older) of Suitest JavaScript API and is meant only for users who have not yet switched to the version 3. If you are new to Suitest JavaScript API, please use the version 3 instead.

To program your test cases and advanced usage of Suitest features use the Suitest JavaScript API. If JavaScript is not your thing, you can create your tests with our excellent Test Editor.

What is it for?

With the JavaScript API you can program your end-to-end tests. Aside from testing you can use the library to create companion apps that manipulate your Suitest devices or apps. For example, you can easily create a universal remote control or an app performance status reporting application.

An example test scenario for illustration:

const suitest = require('suitest-js-api');

async function threeStepTest() {
    await suitest.openApp();
    await suitest.assert.element('logo').matchesRepo(suitest.PROP.IMAGE);
    await suitest.saveScreenshot('./my-screenshot.png');

threeStepTest().then(console.log, console.error);

Pretty easy right?

The JavaScript API is designed as a Node.js module and is freely available for download through NPM. Want to start right away? You'll need just your Suitest account and the API docs.

Suitest Network API is another useful API to access and manage things in Suitest or to marry Suitest with your continuous integration process.

Have fun!