Browser testing using Cypress and BrowserStack

A step-by-step process for UI testing & automation

Why automation?

Introducing Cypress

npm install cypress --save-dev

Writing the test cases

describe('My app', () => {
it('should load', () => {
cy.visit('https://your-app-or-webpage.com/')
cy.get('.important-element').should('exist')
})
})
npx cypress open
Sometimes it’s better to write tests before development. It’s called TDD
Make sure all of your tests are passing

Introducing BrowserStack

npm install browserstack-cypress-cli
npx browserstack-cypress init
npx browserstack-cypress run --sync
BrowserStack build dashboard
BrowserStack build info

More from BrowserStack

Summary

Developer Relations 🥑 Engineer 🛠 High-functioning Absurdist. I cherish beauty, meaning, and the paradox of it. https://bharathraja.in/