Skip to main content

Installation

First of all sign up for an account on the Testabulous platform. There's no initial commitment and no credit card required. All new accounts get 50 credits free so it costs nothing to get started.

Once you've signed up for an account, create a new project in your dashboard.

Next, install the testabulous runner in your project and add the relevant scripts to your package.json file.

npm install --save-dev @testabulous/runner

Once you have the package installed you can initialise it with the following command. You'll need the project ID and API key from the dashboard.

npm run env -- testabulous init

This will create a skeleton folder structure and update your configuration. The project ID and API key are written as environment variables to a file called .env.testabulous which is references in the newly created testabulous.config.json. For security reasons you should not add this file into source control. Instead add this file to your .gitignore file. Alternatively you can add the relevant lines to an existing .env file or create the environment variables elsewhere (e.g. a CI/CD pipeline). The relevant scripts are added to your package.json file.

You can also pass the projectID and API key on the command line:

// package.json
{
"name": "...",
...
"scripts": {
"testabulous:test": "testabulous --project-id <ppppp> --api-key <kkkkk> test",
...
}
...
}

On first run the runner will create the default folder structure. A minimal configuration file is created by default however it can be updated to further customise your Testabulous configuration (see reference).

# File layout
<project root>
-- /testabulous
-- /tests
-- /scripts
-- /cache
-- /logs
-- /screenshots
-- testabulous.config.js

That's it! You are now ready to start writing tests. These should be placed in the testabulous/tests folder. When your ready to run your tests just execute:

npm run test

Test results are written to the logs folder and consist of both JSON and HTML formatted files. Screenshots are stored in the screenshots folder and are referenced in the result logs to make them easier to find.