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.2k stars 73 forks source link

Feature Request: Support OpenAPI links for dependent requests #55

Closed jasikpark closed 1 year ago

jasikpark commented 1 year ago

https://swagger.io/docs/specification/links/ may be a start to automating creation of resources, though I guess that would require more management of what resource ids are valid..

jasikpark commented 1 year ago

Similar to Functional tests but written into the OpenAPI doc!

DominickMad commented 1 year ago

code

en-milie commented 1 year ago

Hi @jasikpark . No, it doesn't support this yet. You can achieve similar functionality, as you mentioned, using the cats run ... which accepts a YAML file with a simple DSL for writing and linking tests. Additionally, there are some fuzzers which have some intelligence, which will automatically identify the links between POST and GET/DELETE endpoints based on conventions.

jasikpark commented 1 year ago

do you have any recommendations for those fuzzers?

en-milie commented 1 year ago

You can follow this guide: https://endava.github.io/cats/docs/fuzzers/special-fuzzers/functional-fuzzer/ to corelate tests. CATS will fill in most of the details, while you need to supply the correlations between responses and next requests. Additionally, there is a functionality that caches POST responses and will try to reuse Resource Identifiers on subsequent DELETE calls. And lastly, there is a CheckDeletedResourcesNotAvailableFuzzer that will check if successful DELETEs are not returned through GET. I hope it helps.

en-milie commented 1 year ago

@jasikpark Updated the previous comment with the actual guide. Apologies for missing it the first time. Can I close this issue?

jasikpark commented 1 year ago

I kinda want to turn the issue into a Feature Request for links support, but sure 🤷‍♀️

en-milie commented 1 year ago

Sure. I'll leave it open then. And look into how to introduce support for links in the future.

en-milie commented 1 year ago

This won't get implemented in the near future. The feature is no so widely used.