cats icon indicating copy to clipboard operation
cats copied to clipboard

Cats not using provided API examples

Open blackgrease opened this issue 1 year ago • 3 comments

Describe the bug When the flag --useExamples is explicitly set, cats still uses random data input. This is a problem as when running tests that require correct data in a POST/PUT/PATCH request, the request fails due to data validation not being passed. Which doesn't give proper insight into testing

To Reproduce Steps to reproduce the behaviour: 1.cats --contract {docs} --server {server} --maxRequestsPerMinute 120 -A -f ExtraHeaders -H 'User-agent={useragent}' -H 'Authorization={other_jwt}' -g note,info -j -o BrokenFunctionality --proxyHost localhost --proxyPort 8090 --useExamples 2. The proxy is to see the result of the request. I have included a screenshot of the resulting request via the proxy. (Info identifying app has been removed). Any fuzzer that does not target fields has this issue. 3. image

Expected behaviour When --useExamples is set, the API data should be used instead of random inputs that will definitely cause the test to fail

blackgrease avatar Oct 10 '24 10:10 blackgrease