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

Debugging 🐛

Cypress runs on debug mode by default, once you add a debug info, it allows to debug your test on 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 hold the actual test files, read more
  • Plugins allow 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! 🎉