Crucio is a test harness used to see how a webservice behaves when its dependencies has a specific failure mode.
Rust nightly is required (until async/await is stable).
cargo install crucio
You need to have a file with some content that used for healty responses.
RUST_LOG=crucio=info crucio
Crucio listens to multiple ports. Each port will emulate one failure mode. Set your application to connecto to one of the ports to check how it responds to that kind of failure mode.
When basePort
is 10000
(the default), this is the ports and their failure modes.
The control. Healthy response, it returns the input file given with no delay.
Waits 9 seconds before returning the file.
Return the HTTP header instantly, then waits 1 second between each byte in the body.
Correct HTTP header, but the body is just a infinite stream of random bytes.
Correct HTTP header, but the body is just a infinite stream of random alphanumeric characters.
Will accept the response, but let it hang and never return anything.
Will accpet the response and return a header, but will just hang and never return a body.
TCP Echo server. Will just return what it gets from the client.
TCP server which will close the connections immediately after having accepted a connection.
TCP Server which drops the socket, which means it will never be closed. In effect this is the same as 10005.
TCP Server which will never accept any connections.
TCP Server which will just send a few random bytes and then close the socket.
TCP Server which will send a infinite stream of random bytes. Will never close the socket.
Like Http Slow
, but will wait for a random amount of time. The number of ms to sleep is LogNormal, which means that most request will return relatively fast, but some will take a long time.
Like Http Random Sleep, but will fail 50% of the time, returning a 500.
Will always return a 500 - internal server error.
Will always return a 500, but with a 9 second delay.