Endava / cats

CATS is a REST API Fuzzer and negative testing tool for OpenAPI endpoints. CATS automatically generates, runs and reports tests with minimum configuration and no coding effort. Tests are self-healing and do not require maintenance.
Apache License 2.0
1.11k stars 75 forks source link

The token setting doesn't work in CATS #68

Closed Hannah516 closed 1 year ago

Hannah516 commented 1 year ago

Hello, I want to do API test for our internal website. I set the token in the header file like: all: Authorization: Token aaaaaaaaaaaaaaaaa and run the cmd:java -jar cats.jar --contract=simple.yaml --blackbox --server=http://109.105.***.**:8080/v1 --headers=headers.yaml, But the report of CATS display the request header like: [ { "key": "Accept", "value": "application/json" }, { "key": "Content-Type", "value": "application/json" } ].

Also I set the token in the cmd line like: java -jar cats.jar --contract=simple.yaml --server=http://109.105.***.**:8080/v1 -H "Authorization=aaaaaaaaaaaaaaa". The request header is still: [ { "key": "Accept", "value": "application/json" }, { "key": "Content-Type", "value": "application/json" } ].

So my question is how can I set the request header of "Authorization: token aaaaaaaaa"? Thank you very much.

en-milie commented 1 year ago

Hi @Hannah516. Can you please confirm if you are using the latest version of CATS 8.6.2? You can check it with: java -jar cats.jar --version

Hannah516 commented 1 year ago

Hi @Hannah516. Can you please confirm if you are using the latest version of CATS 8.6.2? You can check it with: java -jar cats.jar --version

I used latest version instead of v8.6.0. It works now. Thanks a lot.