Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Modern Web Testing with TestCafe

You're reading from   Modern Web Testing with TestCafe Get to grips with end-to-end web testing with TestCafe and JavaScript

Arrow left icon
Product type Paperback
Published in Sep 2020
Publisher Packt
ISBN-13 9781800200951
Length 168 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Dmytro Shpakovskyi Dmytro Shpakovskyi
Author Profile Icon Dmytro Shpakovskyi
Dmytro Shpakovskyi
Arrow right icon
View More author details
Toc

Table of Contents (9) Chapters Close

Preface 1. Chapter 1: Why TestCafe? 2. Chapter 2: Exploring TestCafe Under the Hood FREE CHAPTER 3. Chapter 3: Setting Up the Environment 4. Chapter 4: Building a Test Suite with TestCafe 5. Chapter 5: Improving the Tests 6. Chapter 6: Refactoring with PageObjects 7. Chapter 7: Findings from TestCafe 8. Other Books You May Enjoy

Creating a basic configuration for the test project

Now, let's assemble all that we have learned in this section and create a folder with the basic configuration for our test project by opening any shell (for example, we will use Terminal with Bash) and executing the following steps:

  1. As we have already downloaded and installed Node.js, let's check its version:
    $ node -v
  2. Then, create a folder for your future test project:
    $ mkdir test-project
  3. Now, go to that folder and initiate a basic package.json file to store all the dependencies:
    $ cd test-project/
    $ npm init --yes
  4. After that, install the TestCafe package and save it to your list as a development dependency:
    $ npm install testcafe --save-dev
  5. As a final step (for now), create a .testcaferc.json configuration file with a minimal set of options:
    {  "browsers": "chrome",  "src": [    "tests/**/*.js",    &quot...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image