Hey. I was wondering if its possible to have multi...
# pact-jvm
g
Hey. I was wondering if its possible to have multiple VerifyContractTest classes on the provider verification? I want some tests to use testTarget but other tests to use MockMvc with testTarget.
j
I’ve been wondering the same thing. I have a service that has many endpoints and don’t want to have one HUGE verification test class. It would be nice to segment the tests into classes based on their endpoints.
g
Never really figured it out without having to write spaghetti. The easiest solution is to just rename the provider for each test that requires a different class, but we decided not to go with this, since it would look messy in the broker.
This will only run verification tests on the
/customer
endpoint.
Copy code
@PactFilter(value = {"^/customer"}, filter = InteractionFilter.ByRequestPath.class)
public class CustomerContractVerificationTest {
...
1