WireMock v2.3.1 released

123 views
Skip to first unread message

Tom Akehurst

unread,
Nov 3, 2016, 1:36:37 PM11/3/16
to wiremock-user
Changes:
  • Fixed an NPE thrown when a diff is rendered for a request pattern with a custom matcher
  • Added support for immediately persisting stub mappings by adding "persistent": true
  • Restored Java 8 lambda support for custom matchers (accidentally broken during the 2.0 beta)
  • Added RAML and Swagger specs for the admin API
  • Added Swagger UI under /__admin/swagger-ui
  • Added admin API documentation
  • Documented how to add a default stub mapping - thanks Michael Vogiatzis

Sam Edwards

unread,
Nov 10, 2016, 9:19:31 AM11/10/16
to wiremock-user
Thanks Tom!

Sam Edwards

unread,
Nov 11, 2016, 10:13:32 AM11/11/16
to wiremock-user
I just ran our Android test suite with 2.3.1 (upgraded from 2.2.2).  All of our tests fail as it looks like the server is not initializing on Android.  Here is the stack trace:

11-11 10:10:29.168 8723-8738/? I/TestRunner: ----- begin exception -----
11-11 10:10:29.168 8723-8738/? I/TestRunner: java.lang.IllegalArgumentException: resource assets not found.
                                                 at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145)
                                                 at com.google.common.io.Resources.getResource(Resources.java:197)
                                                 at com.github.tomakehurst.wiremock.jetty9.JettyHttpServer.addAdminContext(JettyHttpServer.java:291)
                                                 at com.github.tomakehurst.wiremock.jetty9.JettyHttpServer.<init>(JettyHttpServer.java:98)
                                                 at com.github.tomakehurst.wiremock.jetty9.JettyHttpServerFactory.buildHttpServer(JettyHttpServerFactory.java:31)
                                                 at com.github.tomakehurst.wiremock.WireMockServer.<init>(WireMockServer.java:73)
                                                 at component_ui_tests.ComponentUiTest.<init>(ComponentUiTest.java:126)
                                                 at component_ui_tests.login.LoginComponentUiTest.<init>(LoginComponentUiTest.java:23)
                                                 at java.lang.reflect.Constructor.newInstance(Native Method)
                                                 at org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:217)
                                                 at org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:266)
                                                 at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
                                                 at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:263)
                                                 at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
                                                 at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
                                                 at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
                                                 at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
                                                 at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
                                                 at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
                                                 at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
                                                 at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
                                                 at org.junit.runners.Suite.runChild(Suite.java:128)
                                                 at org.junit.runners.Suite.runChild(Suite.java:27)
                                                 at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
                                                 at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
                                                 at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
                                                 at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
                                                 at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
                                                 at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
                                                 at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
                                                 at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
                                                 at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:59)
                                                 at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:262)
                                                 at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1879)
11-11 10:10:29.168 8723-8738/? I/TestRunner: ----- end exception -----

On Thursday, November 10, 2016 at 9:19:31 AM UTC-5, Sam Edwards wrote:
Thanks Tom!

Tom Akehurst

unread,
Nov 11, 2016, 10:41:26 AM11/11/16
to wiremock-user
Thanks for letting me know. Should be fixable by detecting the context and toggling off the Swagger serving feature. I'll put that in the next release.

Tom Akehurst

unread,
Nov 23, 2016, 6:27:54 PM11/23/16
to wiremock-user
Sam - I've pushed what I hope is a fix for this to master, but I'm struggling to test it because of the VirtualBox multiple hypervisor issue. If you get a moment would you mind taking a quick look?

One warning - npm is now needed to build the Swagger/RAML doc stuff so you'll need to have that installed to run the build. I'm planning to make this optional in future (producing a build without that stuff in it).
Reply all
Reply to author
Forward
0 new messages