Each team has a unique API key that will ensure that all of your team's tests are listed together and linked to the same team.
The API key can be found in the Applitools Test Manager (dashboard) or in the Admin Panel.
In the Test Manager:
In the Admin Panel
The API key can be set hardcoded in the test by using the Eyes setApiKey(<API_KEY>) method.
The best practice is to set the API key as a system environment variable. Then, there is no need to set the key in each test, Eyes will use the system variable by default.
How to set the API key as a system environment variable:
MacOS
- Open Terminal window
- Open the .bash_profile file as follow:
open ~/.bash_profile - Add the following command to the .bash_profile: (Replace <YOUR_API_KEY> with your key)
export APPLITOOLS_API_KEY=<YOUR_API_KEY> - Save (command+S)
Windows
- In Search, search for and then select: System (Control Panel)
- Click the Advanced system settings link
- Click Environment Variables
- In the section System Variables, click New
- Set the variable name to APPLITOOLS_API_KEY
- Set the variable value to your API key
- Click OK