Installing TestCafe

Last edit:  Feb 28, 2019

Contributors:  diana-lakatos

This guide will help you install TestCafe for automated end-to-end web testing.

Requirements

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:

Steps

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
+ testcafe@1.0.1
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:


testcafe -v

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.

Next steps

Congratulations! You have installed TestCafe. Now you can write your first test:

Questions?

We are always happy to help with any questions you may have. Check out our Help page, or contact us.