joelgriffith / navalia

A bullet-proof, fast, and reliable headless browser API
https://joelgriffith.github.io/navalia/
GNU General Public License v3.0
957 stars 33 forks source link

Support for testing APIs #19

Closed lcofre closed 7 years ago

lcofre commented 7 years ago

Hi! Awesome work, and inspiring too!

Any plans to support API testing, specially JSON responses?

Thanks again!

joelgriffith commented 7 years ago

Definitely within the purview of this project. What kind of things/API would you like to see?

joelgriffith commented 7 years ago

https://github.com/joelgriffith/navalia/issues/7 is related

lcofre commented 7 years ago

That's great news!

Checking for http code responses, json in body and response headers, like the ETag. Sending variables in query, path, headers (like the user token or custom headers) and body as json. Checking timing constraints.

That covers all tests I have in mind.

Thanks for this awesome project!

joelgriffith commented 7 years ago

Heads up: https://github.com/joelgriffith/navalia/pull/21 now adds support for doing a subset of the features you described. HTTP codes and Headers aren't there yet, but I'll be looking to add them over time (right now it just returns the payload).

Available in 0.0.18

lcofre commented 7 years ago

That's great! I'll look at it while I keep an eye on updates.

Feel free to close this issue if you consider it.

joelgriffith commented 7 years ago

0.0.19 was just published, and includes all the functionality you've described. Closing!

PST, docs are here: https://joelgriffith.github.io/navalia/Chrome/fetch/