Testing using JS API

Questions you may encounter while testing with Suitest. If you cannot find an answer to your question please contact us.

How can we integrate our JS API tests with any ALM tool (Test and defect management) like Jira?

If you want to use our JS API - you are supposed to run tests on your own CI server. In that case, you do not really need any integration between Suitest and Jira, but rather between Jira and your CI server. Depending on the CI server you are using, there should be plenty of options for the integration. 

How can we use exported test cases and object repositories with JS API?

The simplest way is to use one of our demo applications and replace the sample test with the exported code.

E.g. using Mocha, the test file would look in the following way: 

describe(’Test Suitest name’, () => {

    it(’Test Name’, () => {

        /* paste the the code here */

    });

});

What does the authentication mean inside exported test for using JS API?

Authentication is described more in detail inside our JS API documentation.  

Element export contains a lot of information on Suitest. How can we extract only some information?

JSON export from the Element Repository cannot be used directly with JS API. Main target of this export is to be used for copy/pasting of elements between different Suitest applications and Versions or for potential backup. 

When using JS API, you do not need to export elements from the Element Repository. You can refer to an element by its API ID directly, as described in the corresponding part of our documentation.

Where can I find HTML file with results when using Cucumber demo application?

By default, Cucumber demo application generates only JSON reports. You can then convert them to HTML reports by calling npm run report:html. See more information.

Why can't I test WatchMe application?

By default, Suitest runs tests created in our Web UI through JS API without applied changes. Tests can be debugged and unfinished at the time and we do not want our users to have broken test results. If you wish to test with unapplied changes, use the --include-changelist option of the launcher.

As WatchMe application is shared with every Suitest user and Organization by default in read-only mode, you cannot apply any changes there. Therefore, we recommend first creating a version duplicate and then testing on that new one.

We also recommend enabling the auto-save feature for your changes in that new version.

Can I compare two different test executions instead of opening the reports one by one?

At the moment, there is no tool that would allow you to compare two reports side by side (other than opening those reports in two browser windows). If you need to use a more advanced dashboard, you can use our Network API to fetch the results in JSON format and then import them into the dashboard of your choice. 

JS API-based results are not handled by Suitest reporting. Instead, you can set up your test runner to generate reports in any format you need and then import them into your CI dashboard. 

Is your JS API ES5 compliant?

Our instrumentation library is compliant with ES3 and newer version. Our JavaScript API is meant to be run in a Node.js environment, and we target Node versions 14 and newer, but we strongly recommend to use the latest stable Node.js version.