Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
End-to-End Web Testing with Cypress

You're reading from   End-to-End Web Testing with Cypress Explore techniques for automated frontend web testing with Cypress and JavaScript

Arrow left icon
Product type Paperback
Published in Jan 2021
Publisher Packt
ISBN-13 9781839213854
Length 240 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Waweru Mwaura Waweru Mwaura
Author Profile Icon Waweru Mwaura
Waweru Mwaura
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. Section 1: Cypress as an End-to-End Testing Solution for Frontend Applications
2. Chapter 1: Installing and Setting Up Cypress FREE CHAPTER 3. Chapter 2: Differences between Selenium WebDriver and Cypress 4. Chapter 3: Working with Cypress Command-Line Tools 5. Chapter 4: Writing Your First Test 6. Chapter 5: Debugging Cypress Tests 7. Section 2: Automated Tests with the TDD Approach
8. Chapter 6: Writing Cypress Tests Using the TDD approach 9. Chapter 7: Understanding Element Interaction in Cypress 10. Chapter 8: Understanding Variables and Aliases in Cypress 11. Chapter 9: Advanced Uses of Cypress Test Runner 12. Section 3: Automated Testing for Your Web Application
13. Chapter 10: Exercise – Navigation and Network Requests 14. Chapter 11: Exercise – Stubbing and Spying XHR Requests 15. Chapter 12: Visual Testing in Cypress 16. Other Books You May Enjoy

Opening Cypress

Installing Cypress is the first step on the journey of writing end-to-end tests; now, we need to learn how to use the tools that Cypress provides to run the tests using both the graphical user interface and the dashboards. There are four ways to run the Cypress executable that has been installed on your machine. After opening Cypress, you should then see the Cypress test runner. No matter which way you open Cypress, the test runner dashboard that you are presented with is the same. The following sections detail the different ways to open and run Cypress.

Running with Npx

npx is used to execute npm package binaries and comes with all npm versions from version 5.2. Npx can also be installed using npm from npmjs.com. To run Cypress using npx, you need to run the following command:

 npx cypress open

Running with Yarn

If Cypress was installed using Yarn, you can then open Cypress using the following command:

Yarn run cypress open

Running with the node...

You have been reading a chapter from
End-to-End Web Testing with Cypress
Published in: Jan 2021
Publisher: Packt
ISBN-13: 9781839213854
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 €18.99/month. Cancel anytime