Getting Started
Start testing in prod
Last updated
Was this helpful?
Start testing in prod
Last updated
Was this helpful?
The asserted CLI requires at least Node v10. Check which version of Node you have installed with:
If you do not have Node installed, or have the wrong version, we recommend installing Node using one of the following:
Mac / Linux -
Windows -
Use NPM to globally install the asserted CLI:
At any time you can run the following to get a full breakdown of all CLI commands:
Login to the CLI with:
This will open a browser to so you can create a token and paste it into the interactive prompt. Tokens are associated with the user, not the project, and take on all of the abilities of that user.
Usually routines are associated with a specific git repo or project. Move to the directory where you want to create the test files associated with a routine.
Run the following command to create a .asserted
directory with all the necessary asserted dependencies and configuration:
Inside .asserted
, you'll find:
Your routine is now configured, but only contains examples. To get an idea of how everything works, lets push the current version with the examples.
Once you have a routine running, you'll want to know if it detects any errors.
You can be notified by email or Slack webhook, or by phone if you have a paid plan or have purchased extra SMS.
Any routines that do not have notifications configured are disabled 48 hours they are created. You can re-enable them at any time.
You'll receive an email before this happens, but there is no point in running a routine continuously that doesn't have any way of notifying someone of downtime.
You can create whatever tests or files you'd like inside the .asserted
directory and they'll be included in the next push.
By default, Mocha will run any files with the .asrtd.js
suffix as tests. Though this can be configured inside the routine.json
file.
To run tests locally, you can use:
The results will look something like:
This will push the current version of the code to and you should start seeing results in the dashboard within a few seconds.
Go to the settings page of that routine within to add a notification configuration.
From here on out, it works mostly like writing any other Mocha test. The free plans only have a fixed set of dependencies, but the paid plans can include any dependencies you wish. Check out for more on that.
In the event that you have an issue that only seems to manifest when run online, you can use the following option to run the test inside :