Live data from Hacker News

Hurl 4.0.0

hurl.dev

31–40 of 104 posts

Re: Hurl 4.0.0

#31
Speaking of command line HTTP handling, my favorite tool for that is Httpie[1], or rather its faster Rust rewrite, XH[2]. It lets you issue HTTP requests from the command line with much nicer, more HTTP-like syntax than CURL and without the need to learn so many switches. If you already know curl well, it probably won't be of much use, but it's far, far more intuitive for casual use.

[1] https://httpie.io/ [2] https://github.com/ducaale/xh

Re: Hurl 4.0.0

#32
Hurl and it's test cases have been awesome at our Ops team. We're managing an autogenerated config for hundreds of complex webserver rules, and we've been able to (auto-)generate hurl test cases for every single rule and test them in both CI and the actual infrastructure after deploying.

It's simplicity but powerfulness is amazing!

Re: Hurl 4.0.0

#34
post #29
post #12

Earlier quoted context omitted.

For a team using VSCode you can try the vscode-restclient[1] But really Hurl looks really interesting, being editor agnostic is the best solution for your problem, I agree. [1] https://github.com/Huachao/vscode-restclient

I use the vscode-restclient and my primary reason is the conversational flows you can build against an API. Does Hurl support this? If so I would absolutely switch. All I would need to complete the experience is a plugin to do highlighting and integration with the Hurl files.

digikata’s comment above suggests it is possible. It would be great to have something that isn’t attached to the editor of choice.

Re: Hurl 4.0.0

#35
post #23

> Hurl is a command line tool powered by curl, that runs HTTP requests defined in a simple plain text format: This is how every new version announcement should start! I'd never heard of Hurl before and that intro + code sample on top instantly made me want to install and try it out. Congrats on what seems like a great release

Hi, maintainer of Hurl and avid reader of Hacker News for years. I've noted every advice for presentations (put a sample of your language asap, explain your concept every time succinctly, etc...). I've tried to put it in practice on hurl.dev so thank you for noticing it!

That's one of the reasons why I bookmarked it and will test it in various CI pipelines on Monday. ;-)

Re: Hurl 4.0.0

#36
post #25

Feedback: The homepage ( https://hurl.dev/ ) doesn't really make it clear - is this an interactive tool or not? If I understand it correctly, you're supposed to save that example as a file and run 'hurl example.hurl'. It would make it easier to understand if that sample code box had a headline saying e.g. [example.hurl].

I'm not the author, but after reading the manual (https://hurl.dev/docs/manual.html), it seems to me that the tool can be used both ways. That being said, i think the value of this tool (beyond a tool like curl, wget, etc.) is that its likely preferable to base usage on non-interactive use, or at least leverage the tool via its .hurl files. While i actually like the succinctness of the homepage in describing this tool, you're not wrong that the author could have added an additional sentence stating the interactive or not point slightly more clearly. Even still, the documentation is much better for this tool, than other tools that i have seen. For this i'm thankful!

Re: Hurl 4.0.0

#37
post #10

Please make this the industry standard for testing APIs. I'm tired of having to look at Postman screenshots sent from QA. I'm tired of having to wait for them to press Send once I've implemented a fix. I know they're tired of waiting for me to do that, too. Hurl is something both the devs and QA can speak and write. It can be automated and a part of CI. It makes communicating expectations straightforward. It can be c…

Not that I necessarily think it's best to stay with Postman, but have you looked at newman, which is the CLI runner for postman configs? We had postman as a test suite for something (which is more an API than an app), and I got tired of having to deal with setting up extra steps to test and of exporting the postman config to save in the repo, so I put newman on the test system and just run against the config directly in the test environment and check the output.

I don't necessarily recommend editing the postman config json directly to set up new tests as it's a PITA, but it's generally what I do so I don't need to keep importing and exporting it with Postman.

A tool designed for working with on the shell is likely better than what I'm doing with newman (since the config is not the most accessible), but it also meant I didn't need to rewrite a bunch of existing tests and verify they actually did the same thing.

Re: Hurl 4.0.0

#38
post #10

Please make this the industry standard for testing APIs. I'm tired of having to look at Postman screenshots sent from QA. I'm tired of having to wait for them to press Send once I've implemented a fix. I know they're tired of waiting for me to do that, too. Hurl is something both the devs and QA can speak and write. It can be automated and a part of CI. It makes communicating expectations straightforward. It can be c…

I personally like the approach of defining things via an OpenAPI and then using Dredd to validate the spec against itself.

Even for tools that generate the spec from source code, it is usually still possible for user error to define the metadata for an endpoint incorrectly. Dredd catches that.

Re: Hurl 4.0.0

#39
As other people, I really think this is a great piece of software, but I didn't ser any way of reusing hurl file in anothers? For intégration testing, this would be much more cleaner

Re: Hurl 4.0.0

#40

Is anybody else wary of a new grammar with no transformer available to/from anything more common (e.g. json/xml)? I did find [this][1] tree-sitter parser, so that's a start, but it seems like writing these would be a lot easier to write these if the interface was a library in a general purpose language or a subset of json. [1] https://github.com/pfeiferj/tree-sitter-hurl

You can export Hurl file to JSON with hurlfmt. We've done this so you can go to another tool if you prefer and convert your tests. It may be a start. The Hurl parser is also available as a library through Rust crates.
Post reply on HN