MockServer v5.10.0 Release Notes

Release Date: 2020-03-24 // 2 months ago
  • ➕ Added

    • 🌐 closure / object callbacks uses local method invocation (instead of Web Socket) when both the client in same JVM (i.e. ClientAndServer, JUnit Rule, etc)
    • 👌 support to specify a fixed TLS X509 Certificate and Private Key for inbound TLS connections (HTTPS or SOCKS)
    • ability to prioritise expectations such that the matching happens according to the specified priority (highest first) then creation order
    • ⚡️ ability to create or update (if id matches) expectations from the client using upsert method
    • ability to return chunked responses where each chunk is a specific size by using response connection options
    • 👌 support for XmlUnit placeholders https://github.com/xmlunit/user-guide/wiki/Placeholders
    • ➕ added ability to control (via configuration) whether matches fail fast or show all mismatching fields
    • 🔧 configuration to disable automatically attempted proxying of request that don't match an expectation and look like they should be proxied

    🔄 Changed

    • 👌 improved X509 certificates by adding Subject Key Identifier and Authority Key Identifier
    • stopped delay being applied twice on response actions (#721)
    • 👌 improve support for clients making initial SOCKS or HTTP CONNECT requests over TLS
    • 🚚 replaced JSONAssert with JsonUnit to improve JSON matching and remove problematic transitive dependencies
    • ➕ added more detail of cause of match failure

    🛠 Fixed

    • 🛠 fixed null point for expectation initialiser with file watcher in working directory specified with relative path
    • 🛠 fixed error resulting in enum not found exception for log events
    • 🛠 fixed error with parsing of json arrays for expectation responses with json body as json object not escaped string
    • 🛠 fixed meaning of disableSystemOut property so that only system out is disabled not all logging
    • 🛠 fixed key store type in key store factory to avoid issue with the JVM changing the defaults

Previous changes from v5.9.0

  • ➕ Added

    • ➕ added stopAsync method to ClientAndServer to allow stop without waiting
    • 🚚 log events for UPDATED_EXPECTATION and REMOVED_EXPECTATION
    • ⚡️ ability to update existing expectation by id
    • hot re-loading of expectation initialiser file
    • ➕ addition configuration for web socket client event loop size
    • ➕ addition configuration for action handler thread pool size
    • 🔦 exposed request raw bytes to object callbacks (allows forwarded requests body parsing that is inconsistent with Content-Type header)
    • ➕ added support to delay socket closure using connection options
    • ➕ added support to control trusted certificate authorities (trust store) for proxied & forwarded requests
    • ➕ added support for two-way TLS (mTLS), also called client authentication
    • 👍 now sends TLS X509 certificate from proxy (i.e. support forward client authentication / mTLS)
    • ➕ added ability to dynamically create local unique Certificate Authority (CA) X.509 and Private Key to improve securiy of clients trusting the CA

    🔄 Changed

    • 🐎 performance improvements for header and cookie handling
    • 👌 improved JSON validation errors by adding link to OpenAPI Specification
    • ✂ removed duplicate packages between modules to prepare for java modules
    • 🔧 caught Jackson configuration exception to improve resilience with other Jackson versions in classpath
    • 🏗 moved Junit4 to separate module to reduce size of jar-with-dependencies, simplify code and increase build speed
    • enabled case insensitive matching for regex matches
    • 👌 improved documentation (i.e. on website)
    • switched from Bouncy Castle to JDK for certificate and private key generation

    🛠 Fixed

    • 🛠 fixed error where ClientAndServer does fully wait for client to stop
    • 🛠 fixed ability to specific a log level of OFF
    • 🛠 fixed bug with keystore type configuration not being used in all places
    • ➕ added file locking and jvm locking for expectation persistence file to avoid file corruption
    • 🛠 fixed verification incorrectly matching verifier non-empty bodies against empty request bodies
    • stopped response callbacks for proxied requests blocking threads
    • 🛠 fixed bug that caused JSON bodies in specified expectations as raw JSON to ignore empty arrays and empty strings

    🔒 Security

    • ⚡️ updated tomcat (used in integration tests) to version without vulnerabilities