UNPKG

@applitools/eyes-testcafe

Version:

Applitools Eyes SDK for TestCafe

61 lines (37 loc) 1.66 kB
## Applitools Eyes SDK for [TestCafe](https://testcafe.io/). ## Installation Install Eyes-Testcafe as a local dev dependency in your tested project: ```bash npm i -D @applitools/eyes-testcafe ``` ## Getting started To get started with this SDK, you need to set the following: * [Applitools API key](#API) * [Eyes server URL](#URL) - Required only if the Eyes server is not deployed on the Eyes public server. ### Entering the Applitools API key To authenticate via the Applitools server and run tests, you need to set the environment variable `APPLITOOLS_API_KEY` to the API key provided from Applitools Eyes. For details how to retrieve your API key, see [the Applitools documentation](https://applitools.com/tutorials/getting-started/retrieve-api-key) in the Eyes Knowledge Center. To to this, set the environment variable `APPLITOOLS_API_KEY` to the API key before running your tests. #### Entering the API Key on Linux or a Mac ```bash export APPLITOOLS_API_KEY=<your_key> npx testcafe chrome:headless some-test-dir ``` #### Entering the API Key on Windows ```bash set APPLITOOLS_API_KEY=<your_key> npx testcafe chrome:headless some-test-dir ``` #### Entering the API Key in the config.js file You can also specify the API key in the `applitools.config.js` file. The property name is `apiKey`. #### Example ```js module.exports = { apiKey: 'YOUR_API_KEY', ... } ``` ## Further information For further information, see: * [Quickstart](https://applitools.com/tutorials/sdks/testcafe/quickstart) * [Overview](https://applitools.com/tutorials/sdks/testcafe) * [Changelog](https://applitools.com/tutorials/sdks/testcafe/changelog)