Cypress is a powerful end-to-end testing framework designed to make testing web applications faster and easier.
Clone the Repo:
git clone https://github.com/Rutvi25/React-Vite-Cypress
Install Dependencies
npm install
Start the Development Server
npm run dev
-
Navigate to the
/cypress
directory. -
Write Component Level Test Cases
- Move to the
cypress/component/
directory - Create a new test file with the
.ts
extension, and write the test cases according to requirements.
- Move to the
-
Write End-to-End Test Cases
- Move to the
cypress/e2e/
directory - Create a new test file with the
.ts
extension, and write the test cases according to requirements.
- Move to the
Checkout the basic Todos Application for reference
Launch the cypress to run test suite
npm run cypress
Select the test type
Select the browser
Interact with test runner
Write & run tests, inspect DOM and use the Debugger