Hacker News new | ask | show | jobs
by hassy 1496 days ago
if you’re on a Mac, Artillery has a Homebrew formula too. We have an official Docker image too. Other ways of installing are on the roadmap too (self contained tarballs and binaries).

As to what it does better than curl/wget. Probe is geared towards interactive use with HTTP APIs. So you get syntax highlighting and pretty printing for JSON, built-in querying, request waterfall visualizations, and ability to set expectations on every response.

HTTP/2 is supported.

1 comments

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

Does artillery properly escape the environment variables into json strings? I don't see how it could if you're using bash expansion in double quotes. This feature would only work with string values without spaces or special characters. Don't really see any improvement here.

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

So by embedding a json query evaluator in your http client, this means that every time I iterate on my JMESPath query I'm making a new request? Is there an offline mode? What if my Json file is 200MiB? Or if the request was not idempotent?

Just saying there's good reasons why json query features are not typically built into one-shot http request tools. However, if your tool was not one-shotand you had an interactive session and cached/stored the entire result and then allow the user to interactively query it, then I could see some better value here.

Yeah so the JSON quoting part is something I’m pretty pleased with. We use a YAML parser (JSON is a subset of YAML) to parse those values, which is what allows for double quotes to be omitted.

Good point on iterating on the query! We already save the body into a temp file, so we can make Probe be able to run queries on a file. Adding it to the todo list. :)

(In my own workflow I use gron a lot for getting an overview of the shape of unfamiliar JSON, super handy tool)

As to an interactive shell… yes, 100%. Kicking ideas around something like that as well!

> We use a YAML parser (JSON is a subset of YAML)

I believe that has more sharp edges than one might suspect

      --json "{username: testuser, password: testpassword, birthdate: 2022-05-10}"

    ...,"birthdate":"2022-05-10T00:00:00.000Z"}
The user may be less surprised if the flag were named "--yaml-as-json" or whatever DX friendly variant one wishes, in order to more clearly mark that string as yaml. The user is actually told about the "JSON or YAML", but only if they try to include some scalar value that isn't legal yaml

Also, I appreciate that every service should strive to respond in 10s, but there wasn't an obvious way to get it to be more patient

    RequestError: Timeout awaiting 'request' for 10000ms
        at ClientRequest.<anonymous> (/home/node/node_modules/got/dist/source/core/index.js:962:65)
followed by a ginormous stacktrace and a console.error dump of some event object
thanks for trying it out! adding “make timeouts configurable” to the todo list.

you’re right on that YAML-as-JSON thing. If everything is quoted as JSON, those type conversions shouldn’t kick in. Otherwise there’s room for surprises - perhaps we can do something to make those cases more obvious.