First, locally clone the repositories you want to try Smart Tests with. If your test and production code reside in two different repositories, clone both of them.
If your production code are split among multiple repositories, we recommend you clone a couple of major ones, just to keep this workshop manageable.
You need an API token to use Smart Test. Go to your workspace’s Settings > API Token and generate a new token.
Node: If you haven’t created a workspace yet, please refer to SIGN_UP.md to set one up.
Click Copy key and copy API key.
The smart-tests command expects an API token to be set in the SMART_TESTS_TOKEN environment variable.
export SMART_TESTS_TOKEN=<API TOKEN>smart-tests verify command is a convenient way to make sure all the prerequisites are met and the API key is valid:
smart-tests verify
If you see a message like this, you're all set:
Organization: 'organization'
Workspace: 'workspace'
Proxy: None
Platform: 'Linux-6.10.14-linuxkit-aarch64-with-glibc2.36'
Python version: '3.11.13'
Java command: 'java'
smart-tests version: '2.2.0'
Your CLI configuration is successfully verified 🎉
If you see the help message, the installation was successful. You can now move on to the next step.