Testing

I decided to make tests the domain of 100% vibe coding. the coding assistant has full write access to cq-server/src/tests. Inside are both unit and api tests.

  • Unit tests are made for testing the game rules in various (edge) cases.
  • API tests are end-to-end tests that test the api, service and database layer in cq-server.

When a change is made somewhere, I make the coding assistant aware of this and ask it to refactor the tests accordingly.

The test frameworks uses a separate test database for a run which will be created as part of the test run. The unit test is made to be very fast as it is in memory. the Api tests are comparatively slow as it tests all layers.