8
Pact testing vs end-to-end testing
(vlemmy.net)
All things programming and coding related. Subcommunity of Technology.
This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.
You should end to end test. If it’s slow, do it less often. If it’s costly, again do it less often. But this is your last line of defense against bugs.
Now, every service should also unit test, with mocks of all the other services that they call. I assume this is what you mean by pact testing. These should be locally runnable, as the mocks are cheap offline things. If you need data from a database, I’d recommend mocking the data too.
I think pact testing means contract testing, basically a test that asserts an agreement between two things (microservice, backend, frontend, etc)
My edit covers that
Sorry, the one downside of quick updates is I can respond very quickly before the edit is done / sent through hah.
Yep I could have been more clear this. Pact being the library I am using to fulfil the contract tests.