Vitor Reis Blog

End to End test automation for web apps

November 21, 2019

This article is also available into Português.

Manual testing is by far one of the most painful things in the software development lifecycle, as your products evolve and more functionality is added codebases tends to grow, if your product is being successful the team may grow as well and with it the risk of introducing a regression is even higher.

What makes a test framework good?

In a few words, it must be simple for:

  • Setting up tests
  • Writing tests
  • Running tests
  • Debugging

Strategies for testing

There are many strategies for test automation out there, the main ones usually being:

1. Stub Requests

Pros

  • Fast / Easy / Flexible
  • No Server / DB

Cons

  • Not True E2E
  • Require Fixtures

2. Static User

Pros

  • Real Session E2E

Cons

  • Requires Server
  • Seed the DB
  • Shares Test State

3. Dynamic User

Pros

  • No State mutation
  • Flexible / Powerful

Cons

  • DB Setup / Teardown
  • Slow / Complex

The Cypress solution for it

In 2019 I gave a talk for the React Berlin community in which under 25 minutes we discussed common problems, solutions and how Cypress can allow you implementing test automation for web apps in a fast, easy and maintainable way.

End to End automation testing with Cypress – Vitor Reis Video: Test automation with cypress, React Berlin November, 2019

References


Vitor Reis

This is my personal blog, where I share about the people I meet, the books I'm reading, and what I'm learning. I hope that you'll join the conversation. Follow me on Twitter