I’m trying to come up with efficient tests design for the full stack application which combines both client (web ui) and server in one, communicating via JSON API.
I come up with a sample app which is Ruby on Rails:
And I keen to hear more from others experiences
tl;dr The key difference comparing to common approaches is that we treat rails models as a resource documents and use them to assert both UI and API endpoints, without exposing serialization details (JSON Schema) into the tests. As a result it simplify tests, reduces coupling, duplication and expresses architecture.