Testing web apps using TestCafe
Running Tests with Applitools
Prerequisites
- A free Applitools account and Applitools API KEY
Read Retrieving your API key to find your API key.
git
is optionalInstalling git is used to clone the demo project from the Github repository. Instead of installing git
, you can simply download the Zip file from the repository. Further, if you are Mac, you already have git
.
Running the Example Project
- Clone or download the repository and navigate to that folder
git clone https://github.com/applitools/tutorial-testcafe.git
cd tutorial-testcafe
Note: you can alternatively download the project as a Zip file and extract it
- Install the dependencies
npm install
- Run the example test
To run all of the tests, run:
APPLITOOLS_API_KEY="[Your API Key]" npm run test
Adding Applitools Eyes to an Existing Node.js TestCafe Project
Install Applitools Eyes dependencies:
npm install @applitools/eyes-testcafe --save-dev
Sample test
Note that you may set the API key, concurrency (number of parallel screenshots), browsers X viewports, etc in
the applitools.config.js
file in the root directory.
More information
The @applitools/eyes-testcafe
npm package page contain more information about advanced configuration, best practices and troubleshooting. Visit eyes-testcafe SDK repo to find out more about what's possible with Applitools' TestCafe SDK.
Don't suffer in silence! Let us help you. Please reach out to us to get your project working.
Taking the next steps with Applitools
Congratulations on completing this quickstart! There's still so much to learn about visual testing with Applitools, but you're off to a great start.