viclovsky / swagger-coverage

Tool which generates full picture of coverage of API tests based on OAS (Swagger) v2 and v3
Apache License 2.0
198 stars 37 forks source link

How to generate swagger data from tests? #55

Closed Snoopke closed 4 years ago

Snoopke commented 4 years ago

Thanks for your project! I tried your example from run.sh, it works perfect!

Now I'm trying to apply it to my project. I have swagger from developers and my python tests. I need to generate swagger from tests then to compare, but I don’t understand how to do it exactly.

Dont you know how can i do it in python? Sorry, if the question is dumb

viclovsky commented 4 years ago

Hi, @Snoopke Swagger-coverage supports listener for rest-assured from the box at the moment. If you use another test framework you need to add custom listener/filter/interceptor or proxy, which save information about calls in swagger format(for example https://github.com/viclovsky/swagger-coverage/blob/master/swagger-coverage-commandline/src/test/resources/swagger-coverage-output/one_parameter.json) in specific folder on executing tests.