am trying to do test for consumer driver contract testing using pact jvm and able to generate consumer side contract file.During provider side verification, how to provide public API's instead of localhost most of the examples uses only localhost as provider, any help pls
@RunWith(PactRunner.class) // Say JUnit to run tests with custom Runner
@Provider("WeatherProvider") // Set up name of tested provider
@PactFolder("D:\Workspace\pactConsumer\pactConsumer_v2\pacts") // Point where to find pacts (See also section Pacts source in documentation)
@VerificationReports(value = {"markdown","json"}, reportDir = "D:\Workspace\pactConsumer\pactConsumer_v2\target")
public class ProviderVerifyer {
@State("Weather information is available for Chennai") // Method will be run before testing interactions that require "with-data" state
public void getWeather() {
System.out.println("Weather information is available for Chennai" );
}
@TestTarget // Annotation denotes Target that will be used for tests
public final Target target = new HttpTarget(8114); // Out-of-the-box implementation of Target (for more information take a look at Test Target section)
}