3 ms·
Or even avoid programming languages as much as possible. Most of my API tests are done with curl and jq. (Which I blogged about here: https://lambic.ca/blog/api
by lambic 5y ago
Or even avoid programming languages as much as possible. Most of my API tests are done with curl and jq. (Which I blogged about here: https://lambic.ca/blog/api-testing-with-curl/ https://lambic.ca/blog/api-testing-with-curl/)
- SideburnsOfDoom 5y agoI think you're actually testing with bash (and included tools) there. Which is fine, bash is a programming language of sorts (I see "if" statements!), and you can store the tests in text files in git. If those are the tools that you like to use, and it works, great.
- lambic 5y agoThat's why I said "as much as possible". I keep the bash scripts as linear as possible so they are "scripts" rather than "programs". We started out using cypress, which I was convinced was the wrong tool for testing APIs so I switched to this approach, which sped up our CI deployments significantly.
- lf-non 5y agoYeah, I have been using httpie (which offers a better DX) in similar fashion. It also pairs well with (n)vim - I can just run :.!http whatever and have the response injected into a vim buffer where I can inspect or slice and dice the json with my usual vim workflow.