React Testing

End-to-End Testing

  • test the system as a whole
  • most useful because they test the system through the same interface as real users use
  • challenge to configure
  • slow process especially with large system; not good during development stage
  • tests can be flaky - some test might pass one time and fail another even if the code did not change
  • challenge is E2E test does not have access to database
    • solution is to create API endpoints to the backend for the test to empty the database

Cypress

Jest

React Testing Library

Supertest