xd009642 / streamer-template

3 stars 0 forks source link

Testing strategies #9

Open xd009642 opened 4 months ago

xd009642 commented 4 months ago

Whole API integration tests, mocking the model, injecting things like failures etc. Make something fancier.

xd009642 commented 1 month ago

I want to also use this to experiment with finding a middle point between the testing level I applied in safety critical software and the default level I reach for. Efforts to explain test justifications more, things like property testing, unit tests, integration tests and snapshot tests. Breaking down what areas are important etc etc.

A few things that can cause mistakes/friction that should be taken care of:

  1. Testing behaviour with early cancellation/disconnection and making sure it doesn't take up resources unnecessarily
  2. Stubbing in a different model just for testing
  3. Using tests to validate both client and server and mimicking a user flow
  4. Using tests as documentation on how things should be expected to be used as well as how to not use them (and ensuring it fails nicely)
  5. Possibility of using exposed metrics as part of testing - can this validate our choice/usage of metrics
  6. Testing streams

If possible any examples or extra binaries created to aid in development should be utilised in integration tests as well.