from Hacker News

Show HN: A Swiss army knife for testing HTTP from the terminal

by hassy on 5/10/22, 9:30 PM with 42 comments

Hiya HN!

Just released Artillery Probe - a Swiss army knife for testing HTTP from the CLI. Think mini-curl with better UX for common use-cases, plus a couple of extra features.

Would love for you to try it and give some feedback!

https://www.artillery.io/blog/swiss-army-knife-for-http-testing

and:

  npm install artillery@latest
What does it do?

- First of all, it's a HTTP client! It does all the usual stuff you'd expect from a HTTP client... HTTP methods, request bodies, custom headers, forms, Basic Auth etc.

- Got some JSON or XML back? It'll pretty-print it, and syntax highlight it for you.

- It'll show you request waterfalls like this one: (inspired by httpstat)

   DNS Lookup | TCP Connection | SSL Handshake | Time to First Byte | Content Transfer
    56ms      |  14ms          |     19ms      |     181ms          |   88ms          |
              |                |               |                    |                 |
              56ms             |               |                    |                 |
                            70ms               |                    |                 |
                                             89ms                   |                 |
                                                                  270ms               |
                                                                                 total:358ms
- JSON responses can be queried and sliced and diced with JMESPath (same syntax as AWS CLI) - no need to reach for jq. XML & HTML may be queried with a jQuery-like syntax too.

- You can set expectations on the response, e.g. have the CLI check that the response is a 200, or that a certain header is set, and exit with non-zero code if not. Super handy for quick acceptance testing.

We've got lots of ideas for improvements, but would love to hear what you think!

  • by numlock86 on 5/11/22, 11:17 AM

    Nice idea. NodeJS and thousands of NPM dependencies are a big no-go with a red flag on top, though. One of the things something like Go probably would have been a better choice for. See "bombardier" for example.
  • by hassy on 5/10/22, 9:30 PM

  • by dj_mc_merlin on 5/10/22, 11:10 PM

    Nice project. How are the request waterfalls done?
  • by arinlen on 5/10/22, 11:20 PM

    Other than pretty printing the output, what does this offer that curl doesn't already do?
  • by ushakov on 5/11/22, 12:21 AM

    does this require Node.JS?

    edit: it looks like you need to install 1276 npm dependencies to use this tool

    https://github.com/artilleryio/artillery/network/dependencie...

    i'll pass, the risk is unacceptable for value it offers, especially in corporate environments

  • by jsd1982 on 5/10/22, 11:05 PM

    > npm install

    Sorry, lost me at this part. Have a better installation story like a single executable.

    Beyond that, what does this do that curl, wget, et al do not? How is your interface better than those? Is it robust in the face of errors? What http protocol versions does it support?

  • by ovebepari on 5/10/22, 11:17 PM

    It would take me something extraordinary to move away from curl