A contract testing tool built in Rust using the filmReel format.
0.3 or greater requires grpcurl v1.6.0 or greater for making gRPC requests.dark:
``` Usage: dark [
] [-v] [--tls] [-pTop-level command.
Options: -v, --verbose enable verbose output --tls enable TLS (automatically inferred for HTTP/S) -p, --proto pass proto files used for payload forming -H, --header fallback header passed to the specified protocol -C, --cut-out output of final cut file -i, --interactive interactive frame sequence transitions --help display usage information
Commands: version Returns CARGOPKGVERSION take Takes a single frame, emitting the request then validating the returned response record Attempts to play through an entire Reel sequence running a take for every frame in the sequence
```
dark take:
```
Usage: dark take -c
Takes a single frame, emitting the request then validating the returned response
Options: -c, --cut filepath of input cut file -o, --take-out output of take file --help display usage information
```
dark record:
```
Usage: dark record
Attempts to play through an entire Reel sequence running a take for every frame in the sequence
Options:
-c, --cut filepath of input cut file
-b, --component repeatable component reel pattern using an ampersand
separator: --component "<dir>&<reel_name>"
-o, --take-out output directory for successful takes
-r, --range the range (inclusive) of frames that a record session will
use, colon separated: --range <start>:<end> --range
<start>:
--help display usage information
```
```sh
dark record ./reelpath reelname --cut ./reelname.cut.json \ <(sops -d --extract '["KEYNAME"]' path/to/myfile.enc.json)
dark -v --interactive record ./testdata post --cut ./testdata/post.cut.json \ <(echo '{"new":"value"}') <(echo '{"newer": "value", "new":"overridden"}') ```
```sh
dark --cut-out >(jq .IP) take ./testdata/post.01s.body.fr.json --cut ./testdata/post.cut.json ```
0.2:form key to HTTP frame requests: {"request":{"uri":"POST post","form":{"key":"val","array[0]":"val0"}}}${lowercase} variables will only be kept around for the duration of the frame0.2.1:${_HIDDEN}dark version commanddark command to be shared across subcommands0.2.3:dark record --component "<dir>&<reel_name>" ./dir/ my_reel_name--cut-out can now be returned on a failed record or take0.3.0:grpcurl properly emits JSON errorsattempts to frame requests: {"request":{"attempts": {"times": 5, "ms": 500}}}0.3.1:0.3.2:process_response comparisonToTakeHiddenColouredJson is now a generic traitToStringHidden is now a generc trait0.3.3:dark record --range "<start_u32>:<end_u32>" ./dir/ my_reel_namegrpcurl errors propagate to stdout properly"request"["form"] request building URL functionality moved to "request"["query"]"request"["form"] now properly bulids the form data of the HTTP request0.4.0:dark record --range "<start_u32>:<end_u32>" ./dir/ my_reel_name