I want to run a bunch of tests, in parallel. I want to serve mocked responses from my service dependencies too. Some test scenarios are expecting error responses, to validate that the client handles them properly. I've found apps that will allow me to pick the current response for a request that matches, and then I can change that response through an API (see: Mockey), but if both tests are configuring the same service at the same time there's going to be problems.
I guess I could have all my clients generate a GUID and add it as the header, but now my tests have to say "return this response, for this path, when you see this GUID header". I'd also need to have my app and tests share this GUID.
Is there an easier way to accomplish this? I don't want to run 10 separate servers because I'm running 10 tests at the same time.
Aucun commentaire:
Enregistrer un commentaire