WireMock 2.4.1 released

189 views
Skip to first unread message

Tom Akehurst

unread,
Nov 25, 2016, 10:53:51 AM11/25/16
to wiremock-user
Significant changes:
  • Improved the RAML and Swagger specs
  • Fixed bug where URL paths were being compared unencoded whereas path + query is compared encoded - thanks Florian Lasinger
  • Fixed persistent stubbing such that deleting all stubs deletes them from the filesystem/store
  • Added the ability to push mappings from the filesystem to a remote WireMock instance via the Java API
  • Fixed ResponseDefinition.like() not copying all fields over
  • Fixed case sensitivity in basic auth matching
  • Silenced XML parsing error messages in stderr - thanks Alexander Pushkarev
  • Deprecated badly designed config API for request journal limit
  • Added support for verification against a custom matcher with a remote WireMock instance (used to fail silently)

Sam Edwards

unread,
Dec 16, 2016, 11:55:36 AM12/16/16
to wiremock-user
I just tested Android support and it looks like there is a similar issue to the one in 2.3.1.  Sorry I wasn't able to do validation on this as you requested.  My project is setup to pull from a remote gradle dependency, so using a snapshot version in the future, I should be able to run validations in ~10 minutes.  Building Wiremock locally and adding in local JARs would require a lot of extra setup.  Probably something that should be done for this exact case... but don't have the bandwidth right now for that.

Compilation is great.  During runtime, Jetty 9 is looking for an admin resource however that does't exist.

12-16 11:50:19.664infoTestRunner----- begin exception -----
12-16 11:50:19.667infoTestRunnerjava.lang.IllegalArgumentException: resource assets not found.
12-16 11:50:19.667infoTestRunnerat com.google.common.base.Preconditions.checkArgument(Preconditions.java:145)
12-16 11:50:19.667infoTestRunnerat com.google.common.io.Resources.getResource(Resources.java:197)
12-16 11:50:19.667infoTestRunnerat com.github.tomakehurst.wiremock.jetty9.JettyHttpServer.addAdminContext(JettyHttpServer.java:291)
12-16 11:50:19.667infoTestRunnerat com.github.tomakehurst.wiremock.jetty9.JettyHttpServer.<init>(JettyHttpServer.java:98)
12-16 11:50:19.667infoTestRunnerat com.github.tomakehurst.wiremock.jetty9.JettyHttpServerFactory.buildHttpServer(JettyHttpServerFactory.java:31)
12-16 11:50:19.667infoTestRunnerat com.github.tomakehurst.wiremock.WireMockServer.<init>(WireMockServer.java:73)

Celia Lee

unread,
Jan 5, 2017, 10:40:31 PM1/5/17
to wiremock-user
Hi Sam and Tom,

I am running into the same problem as Sam described here.  Is there a workaround to this issue? would an earlier version of wiremock work on Android?  Sam's example uses wiremock 2.1.7, is that the latest version works on Android?

Thank you in advance for any information you can provide.

Sam Edwards

unread,
Jan 5, 2017, 10:49:22 PM1/5/17
to wiremock-user
2.2.2 is the latest version that works on Android. I am using it extensively on Android with great success. I haven't updated my sample project on GitHub, but here are the imports and excludes.

compile("com.github.tomakehurst:wiremock:2.2.2") {
//Using Android Version Instead
exclude group: 'org.apache.httpcomponents', module: 'httpclient'

//Version conflict with our app's slf4j version
exclude group: 'org.slf4j', module: 'slf4j-api'

//Was getting a classpath conflict for org.objectweb.asm.AnnotationVisitor which is a part of 'net.minidev:asm'
exclude group: 'org.ow2.asm', module: 'asm'

//Was getting this warning, so decided to ignore this version included by WireMock.
//Warning:Dependency org.json:json:20090211 is ignored as it may be conflicting with the internal version provided by Android.
//In case of problem, please repackage with jarjar to change the class packages
exclude group: 'org.json', module: 'json'
}
compile 'org.apache.httpcomponents:httpclient-android:4.3.5.1'

Hope that helps. Cheers,
Sam

Celia Lee

unread,
Jan 5, 2017, 11:02:36 PM1/5/17
to wiremock-user
Hi Sam,

Thank you very much!

Cheers,
Celia

Tom Akehurst

unread,
Jan 6, 2017, 7:01:49 AM1/6/17
to wiremock-user
There's a fix on master for this, which I'll release in 2.5.0 when I get a few spare minutes.

Celia Lee

unread,
Jan 6, 2017, 9:46:57 AM1/6/17
to wiremock-user
Hi Tom,

That is wonderful news.  Looking forward to the new release.  Thanks.

Cheers,
Celia

Sam Edwards

unread,
Jan 7, 2017, 10:41:41 AM1/7/17
to wiremock-user
I just updated my sample GitHub project to use WireMock 2.2.2 along with some other updates.  Let me know when 2.5.0 is out there and I can try to update.  

GitHub Project: https://github.com/handstandsam/AndroidHttpMockingExamples

Tom: Circle CI has support for running Android builds and tests.  https://circleci.com/docs/android/  I might have time at somepoint over the next few months to work on that (fingers crossed).  How would we get SNAPSHOT built artifacts for WireMock to be able to use in the Android tests?  I guess in Circle CI we could clone and build the WireMock repo hopefully and then use the JAR artifacts that were built.  Probably the easiest.

Tom Akehurst

unread,
Jan 9, 2017, 7:47:03 AM1/9/17
to wiremock-user
ICYMI, 2.5.0 is released.

If you could get Android CI working, that would be absolutely awesome. Agree it might be easiest to build from source. I'm not sure how build triggering would work with SNAPSHOTs, I guess unless everything got moved over to Circle.

Celia Lee

unread,
Jan 9, 2017, 10:50:44 AM1/9/17
to wiremock-user
Just updated to 2.5.0 and it looks good.  Thank you!
Reply all
Reply to author
Forward
0 new messages