agrostar / zzapi-vscode

VS Code extension for zzapi - an API testing and documentation framework
MIT License
3 stars 0 forks source link

Automated tests using Jest #20

Closed vasan-agrostar closed 3 months ago

vasan-agrostar commented 3 months ago

Forking this issue from #14

In support of these changes, assuming some proposal moves forward, can we leverage Jest to validate whatever implementation is selected? #18 is a good example of something that would have been caught with some test automation and these changes will be difficult to validate if the project keeps moving ahead with manual QA.

We do have some automated tests in zzapi-cli but it is a copy of the manual tests in zzapi. Not sure why the tests did not catch the regression. @Varun0157 is it because postman endpoints have changed?

Let us move the automated tests to zzapi:

vasan-agrostar commented 3 months ago

Or we could add a doc element against each test/spec to indicate whether it is expected to pass or fail. But we don't parse the doc fields right? Maybe we should do that too. It could be useful for other runners who use zzapi.

Varun0157 commented 3 months ago

The tests did not catch the status assertions missing because of this. Although, any tests we do write at the moment may not pass (or rather, behave as expected) because of the postman-echo endpoints changing as you mentioned.