Better Practices
Published in

Better Practices

End-to-End testing with Cypress

How the Postman Web Team tests web properties

Photo by Pankaj Patel on Unsplash
Writing Unit Tests in Postman 🚀
Postman Web workflow

3 Common Types of Testing

Commence the Googling!

What is Cypress?

$ npm install cypress — save-dev
$ ./node_modules/.bin/cypress open
describe(‘First test’, function() {  it(‘Testing true is true’, function() {    expect(true).to.equal(true);  });});
Running our first test 👍:🎉

Configuring Cypress

{  “testFiles”: “tests/**/*”,  “video”: false}

Continuous Integrations with Cypress

image: cypress/base:10
“start-server”: “npm run dev”,“cypress:run”: “./node_modules/.bin/cypress run”,“test:ci”: “start-server-and-test start-server http://localhost:8000 cypress:run”
definitions:  caches:    npm: $HOME/.npm    cypress: $HOME/.cache/Cypress
- step:  name: ‘CI:Test’  caches:    - npm    - cypress    - node


What testing be like



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Steve Fuller

Front End Engineer that loves JavaScript, React, Redux, GraphQL, Node, and Boston Terriers