re: Should I test at the GUI Level or the API Level? VIEW POST


I'm not sure why it even makes sense to distinguish API/UI from other types of tests if you're developing a system / services full stack. This makes it even harder. You'll have to consider:

  • Backend Unit Tests
  • Backend Integration Tests (Service Level, not external dependencies)
  • Backend Service Test (Aka Service System tests or API, with external dependencies e.g. Real DB)
  • Backend System Test (aka System Test)
  • Frontend Unit Tests
  • Frontend Integration Tests with Backend Mocks
  • Frontend Systemtests with real system

For both back and frontend, the more business benefit (unit < integration < system) them more effort it is to write tests for all use and edge cases.

We are developing test driven, so unit tests are of no question. Then we are moving to use spring boot integration tests for most of the heavy load stuff (DB, MQ, REST) because it's so stunningly easy to write those tests. Then we have the main use cases modeled as end-to-end system tests for both UI and Backend.

code of conduct - report abuse