DEV Community

Vitor Reis
Vitor Reis

Posted on

End to End test automation for web apps

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 tend 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

Top comments (0)