Skip to content

Releases: beltram/stubr

0.6.2

29 Jun 07:17
Compare
Choose a tag to compare

Features

  • support replace string helper
  • support template in bodyFileName

0.6.1

13 Jun 08:27
Compare
Choose a tag to compare

Features

  • fix: previous lognormal crate was requiring java. Implemented in pure Rust now

0.6.0

12 Jun 19:38
Compare
Choose a tag to compare

Features

  • gRPC support !
  • support random delays with delayDistribution
  • caught a lot of panic for a better usage in a load testing environment

0.6.0-rc.1

21 Feb 20:54
Compare
Choose a tag to compare

Features

  • initial gRPC support 🥳

0.5.1

30 Jan 13:53
Compare
Choose a tag to compare

Features

  • base64 0.2x
  • warp-reverse-proxy 1.x (used for recording)

0.5.0

02 Dec 18:55
Compare
Choose a tag to compare

Features

0.5.0-rc.2

19 Oct 14:02
Compare
Choose a tag to compare

Features

  • add verification support by @geovie. You can now add { "expect": 42 } in your stubs and activate verification in your tests like #[stubr::mock(verify = true)]. This will for example fail if your unit tests calls the stub more than 42 times
  • migrated to clap v4
  • turn Config#verbose & Config#verify non optional (minor breaking change)

Fixes

  • (#441) When a request cache-control header was supplied, user defined response headers were ignored and the supplied request header was used instead
  • stop sourcing Cargo.lock file as a lib should always do !

0.5.0-rc.1

14 Apr 22:08
Compare
Choose a tag to compare
0.5.0-rc.1 Pre-release
Pre-release

Features

  • support many more response template helpers like any* such as {{anyRegex '[a-z]{2}'}} or {{anyNumber}} and many more. They all generate random data ; very useful when relaxing contracts. When used on producer side for verifying, they produce assertions on the response.
  • improved and stabilized a lot verifying. Verifying can be used on producer to test the stubs against a real application. You can find examples of this in actix-producer and actix-consumer
  • Add recording for Actix. Helps generating stubs from existing tests. It can be activated with a middleware like this .wrap(ActixRecord::default()). You can find an example here
  • Actix 4 support
  • Better and more accurate completion files for IntelliJ and VsCode

0.4.14

21 Feb 20:31
Compare
Choose a tag to compare

Features

  • JWT request matching is available ! This is specific to stubr and not available in Wiremock. It looks like this:
{
  "request": {
    "jwtAuth": {
      "equalTo": "eyJhbGciOiJSUzI1NiJ9.e30.MBkQ..."
      "alg": {
        "equalTo": "RS256",
        "oneOf": ["RS256", "HS256"]
      },
      "payloadPatterns": [
        { "equalToJson": {"sub": "jdoe"} },
        { "matchesJsonPath": "$.sub" }
        { "expression": "$.sub", "contains": "j" }
        { "expression": "$.authorizations", "equalToJson": {"read": true, "write": "false"} }
      ]
    }
  }
}
  • VsCode instructions to install stubr json schema and benefit from auto-completion
  • Clap 3.1
  • better documentation

0.4.13

12 Jan 17:01
Compare
Choose a tag to compare

Features

  • support for binary response body with base64body
  • clap 3
  • add stubr.path("/...") helper to smoothen dev experience

Migration

  • If you have macros compilation errors, enforces pin-project = "0.4.29" in your project