Skip to content

arthurboeck/poc-cypress-e2e

Repository files navigation

POC - Cypress Interface and Service Tests

Repository build for automated tests using cypress for interfaces and services.

You can check the executions and artifacts on Cypress Dashboard Executions

CI Cypress Dashboard

Test Sources 🌐

Dependencies 🔧

Step by Step 📝

Clonning the Project 🎨

git clone https://github.com/arthurboeck/poc-cypress-e2e.git

Installing Dependencies 📌

npm install

Opening Cypress Interface 💫

npm start

Running Cypress Tests 🚀

npm test

Running Cypress Tests By Tags 🚀

The following command will run all tests with the tag @api, you can read more here.

npm run test -- --env grepTags=@api

Debugging 🐛

Cypress runs in debug mode by default. Once you add debug information, it enables debugging of your test in your browser's console and dev tools, read more

Usage sample ../debug-case.js

cy.get('@postCustomer').then((xhr) => {
            // The bellow command allows to debug on browser dev tools.
            // To check the vars from xhr, you just need to type it on browser console.
            debugger
            expect(xhr.method).to.eq('POST')
            expect(xhr.status).to.eq(200)
        })

Project Structure 📦

Folder Structure 🏗️

These folders hold end-to-end tests and supporting files for the Cypress Test Runner.

  • Fixtures holds optional JSON data for mocking, read more
  • e2e holds the actual test files, read more
  • Plugins allows you to customize how tests are loaded, read more
  • Support file runs before all tests and is a great place to write or load additional custom commands, read more

Structural Files 🗃️

These files hold settings for the Cypress Test Runner.

More Information ✨

Thank you! 🍻

Feel free to colaborate, contact me, or anything else! 🎉

Releases

No releases published

Packages

No packages published