Open blackgrease opened 1 week ago
Hi @blackgrease. Indeed --useExample
does not have first priority, but rather the internal generators. It is indeed a better idea to consider examples if available as first option and then generate.
Fix will be available in 12.2.0. Documentation here: https://endava.github.io/cats/docs/getting-started/examples
Thank you, thatll be much appreciated
Sent from Proton Mail Android
-------- Original Message -------- On 10/11/24 11:38 PM, Madalin Ilie wrote:
Fix will be available in 12.2.0. Documentation here: https://endava.github.io/cats/docs/getting-started/examples
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
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
Expected behaviour When --useExamples is set, the API data should be used instead of random inputs that will definitely cause the test to fail