This guide will help you install TestCafe for automated end-to-end web testing.
To follow the steps in this tutorial, you need NPM (Node.js Package Manager), that you have already installed to install and update the Marketplace Kit. You should also be familiar with TestCafe:
Installing TestCafe is a two-step process:
Step 1: Install TestCafe
Enter the following in your command line to install TestCafe:
npm install -g testcafe
You can follow the installation process in your command line (something similar to this will be displayed after the process has ended):
/usr/local/bin/testcafe -> /usr/local/lib/node_modules/testcafe/bin/testcafe-with-v8-flag-filter.js + firstname.lastname@example.org added 322 packages from 239 contributors in 18.038s
Step 2: Test and run TestCafe
Use the following command to test if you've installed TestCafe successfully:
If TestCafe has been installed correctly, running this command displays the version number. If it hasn't been installed, running this command gives a
command not found error.
After installed, you can run TestCafe from a command line by using the
testcafe command. See a list of available commands and options here.
Congratulations! You have installed TestCafe. Now you can write your first test: