In this 1-hour project, you will build a Cypress test suite for data-driven testing by injecting JSON test data and intercepting API requests to mock responses. This enhances automation by making tests flexible and scalable. You will set up a Cypress project, configure JSON files, use the data to fill input forms, implement data-driven tests, and mock API responses to validate application behavior with real-world data. By completing this project, you will improve your test automation skills. This project is ideal for testers with basic JavaScript and Cypress knowledge. You should have Node.js, npm, and a code editor like VS Code.



Recommended experience
What you'll learn
Set up Cypress for end-to-end testing.
Implement data-driven testing with JSON files and random test data selection.
Intercept and mock API responses to simulate backend behaviors.
Details to know

Add to your LinkedIn profile
February 2025
Only available on desktop
See how employees at top companies are mastering in-demand skills

Learn, practice, and apply job-ready skills in less than 2 hours
- Receive training from industry experts
- Gain hands-on experience solving real-world job tasks
- Build confidence using the latest tools and technologies

About this Guided Project
Learn step-by-step
In a video that plays in a split-screen with your work area, your instructor will walk you through these steps:
Learners will install and set up Cypress, create JSON files for test data, and store them properly. These files will be used to dynamically inject data into test cases, enabling data-driven testing.
Learners will write a Cypress test to retrieve data from a JSON file, input it into a web form, and assert that the correct values are used during execution.
Learners will implement a method to randomly select a JSON file from a directory and use its data for testing, ensuring diverse test coverage with varying input values.
Learners will use Cypress to intercept API requests, handle delays, and inspect responses to verify that the application processes and handles API data correctly .
Learners will intercept and mock API requests in Cypress, modify responses, and validate application behavior to ensure it processes data correctly with mocked APIs .
Recommended experience
Basic JavaScript skills.
Basic Cypress knowledge, including writing and running test cases.
9 project images
Instructor

Offered by
How you'll learn
Skill-based, hands-on learning
Practice new skills by completing job-related tasks.
Expert guidance
Follow along with pre-recorded videos from experts using a unique side-by-side interface.
No downloads or installation required
Access the tools and resources you need in a pre-configured cloud workspace.
Available only on desktop
This Guided Project is designed for laptops or desktop computers with a reliable Internet connection, not mobile devices.
Why people choose Coursera for their career




New to Mobile and Web Development? Start here.

Open new doors with Coursera Plus
Unlimited access to 10,000+ world-class courses, hands-on projects, and job-ready certificate programs - all included in your subscription
Advance your career with an online degree
Earn a degree from world-class universities - 100% online
Join over 3,400 global companies that choose Coursera for Business
Upskill your employees to excel in the digital economy
Frequently asked questions
By purchasing a Guided Project, you'll get everything you need to complete the Guided Project including access to a cloud desktop workspace through your web browser that contains the files and software you need to get started, plus step-by-step video instruction from a subject matter expert.
Because your workspace contains a cloud desktop that is sized for a laptop or desktop computer, Guided Projects are not available on your mobile device.
Guided Project instructors are subject matter experts who have experience in the skill, tool or domain of their project and are passionate about sharing their knowledge to impact millions of learners around the world.