Craig
11/06/2023, 8:23 AM.\wiremock-standalone-3.3.1.jar
When navigating to /__admin/webapp
I get page not found.
Is there an alternative download that includes the webapp?Tom
11/07/2023, 3:39 PMPradeep Vegesna
11/08/2023, 1:25 PMCraig
11/09/2023, 8:46 AM██ ██ ██ ██████ ███████ ███ ███ ██████ ██████ ██ ██
██ ██ ██ ██ ██ ██ ████ ████ ██ ██ ██ ██ ██
██ █ ██ ██ ██████ █████ ██ ████ ██ ██ ██ ██ █████
██ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
███ ███ ██ ██ ██ ███████ ██ ██ ██████ ██████ ██ ██
----------------------------------------------------------------
| Cloud: <https://wiremock.io/cloud> |
| |
| Slack: <https://slack.wiremock.org> |
----------------------------------------------------------------
Version: xxxxKarthik Subramani (CONT)
11/09/2023, 9:45 AMCurl -X POST <https://localhost:8080/raw> -H 'Accept: application/vnd.com.capitalone.ts2proxy+xml' -H 'correlationID:12345678901234' -H 'user-ID:test' -d '<?xml version="1.0"
curl: (7) Failed to connect to localhost port 8080 after 4 ms: Couldn't connect to server
curl: (6) Could not resolve host: applicationKarthik Subramani (CONT)
11/09/2023, 9:46 AMSibin
11/09/2023, 10:24 AMTom
11/09/2023, 5:04 PMTom
11/09/2023, 5:59 PMKevin Wang
11/14/2023, 10:25 PMgosu
in the wiremock docker image. Does anyone know what it is used for? It seems to introduce a lot security vulnerability issues.Oleg Nenashev
11/17/2023, 7:20 AMVitonofrio Del Rosso
11/17/2023, 1:17 PMOleg Nenashev
11/18/2023, 10:19 AMOleg Nenashev
11/20/2023, 8:09 AMBalog Tamás
11/20/2023, 12:07 PMKevin Wang
11/21/2023, 3:38 PMroot-dir
for WireMock recording?Kevin Wang
11/24/2023, 10:12 PMTalles Santana
11/27/2023, 1:44 PMVictor Baulac
11/28/2023, 12:42 PMVadivel Murugan
11/29/2023, 5:44 PMjava.lang.IncompatibleClassChangeError: class org.eclipse.jetty.http2.server.HttpChannelOverHTTP2 has interface org.eclipse.jetty.server.HttpChannel as super class
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1012)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:760)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
at org.eclipse.jetty.http2.server.AbstractHTTP2ServerConnectionFactory.<init>(AbstractHTTP2ServerConnectionFactory.java:82)
at org.eclipse.jetty.http2.server.HTTP2ServerConnectionFactory.<init>(HTTP2ServerConnectionFactory.java:53)
at org.eclipse.jetty.http2.server.HTTP2CServerConnectionFactory.<init>(HTTP2CServerConnectionFactory.java:53)
at org.eclipse.jetty.http2.server.HTTP2CServerConnectionFactory.<init>(HTTP2CServerConnectionFactory.java:48)
at com.github.tomakehurst.wiremock.jetty11.Jetty11HttpServer.createHttpConnector(Jetty11HttpServer.java:53)
at com.github.tomakehurst.wiremock.jetty.JettyHttpServer.<init>(JettyHttpServer.java:89)
at com.github.tomakehurst.wiremock.jetty11.Jetty11HttpServer.<init>(Jetty11HttpServer.java:44)
at com.github.tomakehurst.wiremock.jetty.JettyHttpServerFactory.buildHttpServer(JettyHttpServerFactory.java:31)
at com.github.tomakehurst.wiremock.WireMockServer.<init>(WireMockServer.java:81)
at com.github.tomakehurst.wiremock.junit5.WireMockExtension.startServerIfRequired(WireMockExtension.java:164)
at com.github.tomakehurst.wiremock.junit5.WireMockExtension.beforeAll(WireMockExtension.java:230)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
Suppressed: java.lang.NullPointerException: Cannot invoke "com.github.tomakehurst.wiremock.WireMockServer.isRunning()" because "this.wireMockServer" is null
at com.github.tomakehurst.wiremock.junit5.WireMockExtension.stopServerIfRunning(WireMockExtension.java:218)
at com.github.tomakehurst.wiremock.junit5.WireMockExtension.afterAll(WireMockExtension.java:256)
... 1 more
Do we need any other additional dependencies required inorder to run with spring-boot 3.2?Diego Ríos
11/29/2023, 7:56 PM{
"token_id": "{{randomValue length=36 type='ALPHANUMERIC'}}",
"issuer_decision": "{{request.query.risk}}",
"card_last_digits": "{{jsonPath request.body '$.account_number' | regex '\\d{4}$'}}",
"expiration_date": "{{jsonPath request.body '$.expiration_date'}}",
"token_last_digits": "{{random '5470' '6531' '1467'}}",
"token_expiration_date": "{{random '1128' '0725' '1727'}}",
"token_state": "ACTIVE",
"payment_account_ref": "string",
"info_card_product": {
"bank_name": "Please Contact Your Bank",
"card_type": "UNKNOWN",
"primary_scheme": "VISA",
"card_category_description": "Your Bank",
"card_arts": {
"foreground_color": "7aff54",
"card_background_image_id": null,
"bank_logo_id": null,
"brand_logo_id": null,
"cobrand_logo_id": null,
"complete_card_image_id": "15ac4371-dcb9-4310-867e-b12338970276",
"card_icon_id": "14e3044fa-949e-4900-800f-88b8fc6cc3d5"
},
"terms_condition_url": "string",
"privacy_policy_url": "string"
},
"creation_timestamp": "{{random 'yyyyMMdd' 20220101 20231231}}",
"thales_token_available": true
}
Oleg Nenashev
11/30/2023, 8:40 AMVadivel Murugan
11/30/2023, 9:29 AM@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@AutoConfigureWebClient(registerRestTemplate = true)
class BookApiServiceITest {
@RegisterExtension
static WireMockExtension wireMockServer =
WireMockExtension.newInstance()
.options(wireMockConfig().dynamicPort().usingFilesUnderClasspath("wiremock"))
.build();
@Autowired private BookApiService bookApiService;
@test
void testCreateEntitlement() {
stubFor(
post(urlEqualTo("/entitlement"))
.willReturn(
aResponse()
.withStatus(200)
.withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
.withHeader(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON_VALUE)
.withBody("{\"result\": \"success\"}")));
BookEntitlementResponse entitlement =
bookApiService.createEntitlement(bookObject, "product");
}
}
When I run the test getting below exception, Do we need to set any static port & host to run the testcases?
wiremock.org.apache.hc.client5.http.HttpHostConnectException: Connect to <http://localhost:8080> [localhost/127.0.0.1] failed: Connection refused
at java.base/sun.nio.ch.Net.pollConnect(Native Method)
at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672)
at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:542)
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:597)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
at java.base/java.net.Socket.connect(Socket.java:633)
at wiremock.org.apache.hc.client5.http.socket.PlainConnectionSocketFactory.lambda$connectSocket$0(PlainConnectionSocketFactory.java:85)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
at wiremock.org.apache.hc.client5.http.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:84)
at wiremock.org.apache.hc.client5.http.socket.ConnectionSocketFactory.connectSocket(ConnectionSocketFactory.java:113)
at wiremock.org.apache.hc.client5.http.impl.io.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:181)
at wiremock.org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:447)
at wiremock.org.apache.hc.client5.http.impl.classic.InternalExecRuntime.connectEndpoint(InternalExecRuntime.java:162)
at wiremock.org.apache.hc.client5.http.impl.classic.InternalExecRuntime.connectEndpoint(InternalExecRuntime.java:172)
at wiremock.org.apache.hc.client5.http.impl.classic.ConnectExec.execute(ConnectExec.java:142)
at wiremock.org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
at wiremock.org.apache.hc.client5.http.impl.classic.ProtocolExec.execute(ProtocolExec.java:192)
at wiremock.org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
at wiremock.org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:170)
at wiremock.org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:123)
at com.github.tomakehurst.wiremock.client.HttpAdminClient.safelyExecuteRequest(HttpAdminClient.java:524)
at com.github.tomakehurst.wiremock.client.HttpAdminClient.executeRequest(HttpAdminClient.java:507)
at com.github.tomakehurst.wiremock.client.HttpAdminClient.executeRequest(HttpAdminClient.java:483)
at com.github.tomakehurst.wiremock.client.HttpAdminClient.addStubMapping(HttpAdminClient.java:150)
at com.github.tomakehurst.wiremock.client.WireMock.register(WireMock.java:446)
at com.github.tomakehurst.wiremock.client.WireMock.register(WireMock.java:441)
at com.github.tomakehurst.wiremock.client.WireMock.givenThat(WireMock.java:130)
at com.github.tomakehurst.wiremock.client.WireMock.stubFor(WireMock.java:134)
LinenBot
11/30/2023, 9:53 AMOleg Nenashev
joined #general. Also, tom
and Julian
joined.Mehmet Gul
11/30/2023, 3:39 PMcurl <http://localhost:8080/health>
it doesn’t find it.
Do we still need to define the health stub?
I used to have /health stub in earlier version but when I remove the stub, it is not working.
Any suggestion?Oleg Nenashev
12/01/2023, 8:11 AMVictor Baulac
12/01/2023, 9:54 AMNotFoundException: Not found in blob store: files/{{request.pathSegments.[2]}}
It is not intepreting my variable between {{ }} but considering it as a String. To me it looks like I am doing exactly what the documentation states. Am I missing something ?
Here is my complete JSON :
{
"request": {
"method": "GET",
"urlPathPattern": "/blabla/adc/golden/.*"
},
"response": {
"status": 200,
"bodyFileName": "files/{{request.pathSegments.[3]}}",
"headers": {
"Content-Type": "image/png"
}
}
}
Victor Baulac
12/01/2023, 10:20 AM"Content-Type": "image/png"
and "transformers": ["response-template"]
?
I am returning an image, like that
"bodyFileName": "goldens/C0402.png",
and it works well, untill I complexify it a little bit with "transformers": ["response-template"],
(leaving the bodyFileName hardcoded just to test), I endup with some gibberish..
Exception: <http://wiremock.com|wiremock.com>.github.jknack.handlebars.HandlebarsException: inline@782f54bb:1:3: found: '?' {{{?????I????Q??i???*????k?0??6?Ax3;?$4?^A??3? ?
Nikola Kolchakov
12/04/2023, 9:15 AMLinenBot
12/04/2023, 11:45 PMoleg
joined #general. Also, Alex Gutjahr
and Joao Guilherme Pan
joined.