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
Test Automation Engineering Handbook

You're reading from   Test Automation Engineering Handbook Learn and implement techniques for building robust test automation frameworks

Arrow left icon
Product type Paperback
Published in Jan 2023
Publisher Packt
ISBN-13 9781804615492
Length 276 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Manikandan Sambamurthy Manikandan Sambamurthy
Author Profile Icon Manikandan Sambamurthy
Manikandan Sambamurthy
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Part 1: The Basics
2. Chapter 1: Introduction to Test Automation FREE CHAPTER 3. Chapter 2: Test Automation Strategy 4. Chapter 3: Common Tools and Frameworks 5. Part 2: Practical Affairs
6. Chapter 4: Getting Started with the Basics 7. Chapter 5: Test Automation for Web 8. Chapter 6: Test Automation for Mobile 9. Chapter 7: Test Automation for APIs 10. Chapter 8: Test Automation for Performance 11. Part 3: Continuous Learning
12. Chapter 9: CI/CD and Test Automation 13. Chapter 10: Common Issues and Pitfalls 14. Assessments 15. Index 16. Other Books You May Enjoy Appendix A:Mocking API Calls

Installing and setting up Cypress

Let us now run through a detailed step-by-step installation and setup process for Cypress:

  1. In Chapter 4, we installed Node.js, which is a runtime environment for JavaScript. Node.js installation comes with a default and extremely useful package manager called npm. Figure 5.1 shows how to check the version of npm installed on your machine:
Figure 5.1 – Checking the installed npm version

Figure 5.1 – Checking the installed npm version

  1. Let us next create an empty project to install Cypress and further explore its features. Run npm init –y in an empty folder (preferably named app) in your local directory to create a package.json file. Figure 5.2 shows the corresponding output with the contents of the file:
Figure 5.2 – npm init

Figure 5.2 – npm init

Note

npm init <initializer> is used to set up new or existing packages. If <initializer> is omitted, it will create a package.json file with fields based on the...

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