Releases: beltram/stubr
Releases · beltram/stubr
0.6.2
0.6.1
0.6.0
0.6.0-rc.1
Features
- initial gRPC support 🥳
0.5.1
0.5.0
Features
- A book is now available here and factorizes all the information scattered across all READMEs
- Ready for contract testing using actix 🥳
- Actix recording support
- Support response helpers for randomized data
0.5.0-rc.2
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 than42
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
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
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