I want to mock external services and thought it'd be easier to do so using either MockServer or WireMock for their "Record+Replay" feature.
From what I've gathered, the recording part can generate JSON files, which sounds like a great idea at first. But in terms of version control, there is a problematic: it seems like since it is a single file which is generated, with the requests being ordered chronologically. And tests should not be dependent on other tests, and thus we enforce a random order on the tests being executed. This leads to a polluted git diff.
Ideally, I think the generated files should be separated for each request, but then I believe those two mocking tools offer using only a single file to set up automatically the Replay part to easily mock our external services after having recorded the responses once.
Over the course of multiple months, it is highly probably that the recording would have to be done once again, and ideally only those few responses which might have changed would be modified in the VCS. This leads me to wonder...
Am I ommitting a certain configuration property? Do I have the right approach?
I know this might not be the right place to ask, but I thought it would be worthwhile to try out here first since I don't really know where to ask.
Aucun commentaire:
Enregistrer un commentaire