bstyle killa
07/07/2022, 7:34 PMJ
07/08/2022, 11:52 AM@PactTestFor(pactMethod = "someMethod", port="5000")
Guillermo
07/11/2022, 10:47 AMGuillermo
07/11/2022, 12:19 PMProperty '<http://javax.xml.XMLConstants/property/accessExternalDTD>' is not recognized.
Guillermo
07/11/2022, 12:20 PMSahil Jain
07/12/2022, 10:34 AMSahil Jain
07/12/2022, 10:46 AMcom.github.tomakehurst.wiremock.servlet.WireMockHandlerDispatchingServlet.service(WireMockHandlerDispatchingServlet.java:108)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.servlets.gzip.GzipHandler.handle(GzipHandler.java:479)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:499)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at java.lang.Thread.run(Thread.java:784)
Caused by: java.nio.file.NoSuchFileException: target/pacts/the-consumer-the-provider-febea806-232d-4527-bacb-d501e5048f78-pact.json
at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
at java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:434)
at java.nio.file.Files.newOutputStream(Files.java:216)
at java.nio.file.Files.write(Files.java:3292)
at com.atlassian.ta.wiremockpactgenerator.pactgenerator.LocalFileSystem.saveFile(LocalFileSystem.java:14)
at com.atlassian.ta.wiremockpactgenerator.pactgenerator.PactSaver.saveFile(PactSaver.java:39)
... 24 more
Can someone please help why its not able to save pact file? or i am doing something wrong here. Thanks in Advance.Sri Naga Sai Krishna Sanka
07/12/2022, 9:15 PMintegerType
that supports primitive int. Where as for Integer the value can be either null or plain integer. How can this be handled?Jason Army
07/12/2022, 9:51 PM.valueFromProviderState("degree", "set degree to null", null)
but I've been unable to figure out how to validate it in the provider side using @State
with SpringBootTest. Any help would be appreciated!Kyriacos Elia
07/13/2022, 9:17 AMPaul
07/14/2022, 3:55 PM<dependency>
<groupId>au.com.dius.pact.provider</groupId>
<artifactId>junit5</artifactId>
<version>4.3.9</version>
</dependency>
but give that error in 4.3.11.
Appreciate any help in this.
Many thanksritika arora
07/19/2022, 9:07 AMTaskRunnerToProductCT > sync-service - GET Product by Product Code STANDARD_OUT
[06:17:38,247][INFO] provider.junit5.PactVerificationStateChangeExtension - Invoking state change method 'GetByProductCode':SETUP
Verifying a pact between sync-service and product-service
[from Pact Broker <https://pact-broker.rc.vkp.viatorsystems.com/pacts/provider/product-service/consumer/sync-service/pact-version/9ba7240b86a1ad9f4900fa75e3dab5619744a4e5/metadata/Y3ZuPTk1MTJlNzIzNGEzMjdhYjg4ZjZkMjMxNTA5ZWE2NWUwYjliZTRkMGQmY3Z0W109ZmVhdHVyZV9TVVBQTFktODMxNS1za2lwLW5vbi1zYXBpLXByb2R1Y3RzLXdoZW4tZW5hYmxlLXNjaGVkdWxpbmctcGFjJnc9dHJ1ZQ>]
Given GetByProductCode
GET Product by Product Code
[06:17:38,270][WARN] api.text.TextContentHelper - ContentRef not found :: {"contentRef":"CR-REF1"}
returns a response which
has status code 200 (OK)
has a matching body (OK)
[06:17:38,277][WARN] pact.provider.DefaultTestResultAccumulator - Not all of the 7 were verified. The following were missing:
[06:17:38,277][WARN] pact.provider.DefaultTestResultAccumulator - Get First Publish Requested User By product code
[06:17:38,277][WARN] pact.provider.DefaultTestResultAccumulator - GET Supplier by Product Code
[06:17:38,277][WARN] pact.provider.DefaultTestResultAccumulator - Lookup Product Details
[06:17:38,277][WARN] pact.provider.DefaultTestResultAccumulator - GET product code request
[06:17:38,277][WARN] pact.provider.DefaultTestResultAccumulator - GET products status
[06:17:38,277][WARN] pact.provider.DefaultTestResultAccumulator - GET Supplier by Product Code
SupplyTaskRunnerToProductServiceCT > sync-service - Get First Publish Requested User By product code STANDARD_OUT
[06:17:38,279][ERROR] provider.junit5.PactVerificationStateChangeExtension - Provider state change callback failed
au.com.dius.pact.provider.junitsupport.MissingStateChangeMethod: Did not find a test class method annotated with @State("GetFirstPublishRequestedUser")
for Interaction "Get First Publish Requested User By product code"
with Consumer "sync-service"
at au.com.dius.pact.provider.junit5.PactVerificationStateChangeExtension.invokeStateChangeMethods(PactVerificationStateChangeExtension.kt:125) ~[junit5-4.1.32.jar:4.1.32]
Please suggest how to fix itQingyuan Liu
07/19/2022, 9:42 AMvassilis spiliopoulos
07/20/2022, 4:58 PMMatt (pactflow.io / pact-js / pact-go)
Madhulika Mitra
07/22/2022, 2:28 PMAbdurahman Hijazi
07/22/2022, 3:38 PMGustavs
07/26/2022, 11:38 AMHari Ravi
07/27/2022, 4:50 PMAnkit Mittal
07/28/2022, 4:51 PMJames P
07/28/2022, 10:09 PMJames P
07/28/2022, 10:54 PM@PactBroker(url = "${pactbroker.url}", consumerVersionSelectors = {
@VersionSelector(tag = "main")
})
I can see from the output that it is correctly targetting a main consumer
Verifying a pact between saasConsumer and saasProvider for tag main
However whenever I look at the broker, it shows verifications against multiple previous versions of the contract both on the main branch and a couple of other feature branches, is there a reason for this?James P
07/28/2022, 10:55 PMJames P
07/28/2022, 11:22 PMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Vishal Kukreja
07/29/2022, 12:53 PM@HiltAndroidTest
@Config(sdk = [Build.VERSION_CODES.Q])
@PactTestFor(
providerName = "our_provider"
)
@PactFolder("target/pacts")
@ExtendWith(
PactConsumerTestExt::class)
class VerificationEstimationPactTest {
private var HEADERS: MutableMap<String, String> = HashMap()
private var JSON: String? = null
@get:Rule
var rule: TestRule = InstantTaskExecutorRule()
@get:Rule
var hiltRule = HiltAndroidRule(this)
@Inject
lateinit var viewModel: MutualFundVerificationViewModel
init
{
HEADERS["Content-Type"] = "application/json"
JSON="{\n" +
" \"estimationDate\": \"2022-07-26T10:59:29.935Z\",\n"+
" \"oEstimationDate\": \"2022-07-27T10:59:56.342Z\",\n"+
" \"estimationDate\": \"2022-07-27T11:12:26.640Z\",\n"+
" \"gstimationDate\": \null \n"+
" }"
}
@Before
fun setUp() {
hiltRule.inject()
}
@Throws(
UnsupportedEncodingException::class
)
@Pact(provider = "our_provider", consumer = "our_consumer")
fun createFragment(builder: PactDslWithProvider): RequestResponsePact {
return builder
.given("data count is > 0")
.uponReceiving("a request for json data")
.path("/provider.json")
.method("GET")
.willRespondWith()
.status(200)
.headers(HEADERS)
.body(JSON)
.toPact()
}
@Test
@PactTestFor(pactMethod = "createFragment")
fun should_process_the_json_payload_from_provider() {
// val observer: TestObserver<VerificationTimeResponse> = viewModel.flowUseCase.getVerificationTime().test()
// observer.assertNoErrors()
/*observer.assertValue(
VerificationTimeResponse(
Timestamp("2022-07-26T10:59:29.935Z".toLong()),
Timestamp("2022-07-27T10:59:56.342Z".toLong()),
Timestamp("2022-07-27T11:12:26.640Z".toLong()),
null
)
)*/
}
still unable to generate the contract file.
Kindly help for same.Vishal Kukreja
08/01/2022, 3:06 PMVishal Kukreja
08/01/2022, 3:06 PMHari Ravi
08/01/2022, 12:24 AM