It gives you full control of constructing requests and assertions because test scenarios may include arbitrary JavaScript.
1a527dd5 2 hours ago [-]
Yeah love Hurl, we stared using it back in 2023-09.
We had a test suite using Runscope, I hated that changes weren't versioned controlled. Took a little grunt work and I converted them in Hurl (where were you AI?) and got rid of Runscope.
Now we can see who made what change when and why. It's great.
https://github.com/mistweaverco/kulala.nvim is an another restish (it can do gRPC to) plugin for neovim. It is intended to be compatible with a Jetbrains as much as possible.
(After I have seen the IntelliJ one from a colleague I was searching for one like that in neovim. That's the best one I found. It's not perfect, but it works.
Edit: The tool from OP looks very neat though. I will try it out. Might be a handy thing for a few prepared tests that I run frequently
mcescalante 2 hours ago [-]
yep, I've played with Hurl and find it nice but recently have been leaning into the .http stuff more. IntelliJ has it built in, there's the plugin you linked, and then for CLI i've used httpYac. No "vendor lock in", really easy to share with copy & paste or source control.
gotimo 36 minutes ago [-]
+1 On HttpYac, it's been really nice to get started with and growing into a more powerful API testing suite over time
2 hours ago [-]
jicea 4 hours ago [-]
Hi Hurl maintainer here, happy to answer any question and get feedbacks!
hiddew 2 hours ago [-]
Hurl is underappreciated for writing nice and maintainable HTTP-level test suites. Thanks for the tool!
jiehong 2 hours ago [-]
Thanks a lot for maintaining it!
Where do you see hurl in the next 2 years?
jicea 2 hours ago [-]
Obviously better IDEs integration, support for gRPC, Websocket would be very cool.
A favorite of mine is to be available through official `apt`: there has been some work but it's kind of stuck. The Debian integration is the more difficult integration we have to deal. It's not Debian fault, there are a lot of documentation but we've struggled a lot and fail to understand the process.
Snapshots diff current with previous output and I only have to accept or reject the diff. I don't have to write the expected response myself. Snapshots can also stub out parts of the response that are not determistic.
adelineJoOs 59 minutes ago [-]
> Snapshots can also stub out parts of the response that are not determistic.
TIL! The way I knew to do it was to have a mock implementation that behaved like the real thing, expect for data/time/uuids/..., where there was just a placeholder.
Snapshot tests being able to "mask" those non-deterministic parts sounds cool!
porker 4 hours ago [-]
Is this https://insta.rs/? What are the benefits you've found with snapshot testing?
laerus 3 hours ago [-]
Greatly reduced boilerplate. Diffing snapshots and providing previews to accept or reject changes is also more robust and user friendly.
CommonGuy 2 hours ago [-]
We are working on snapshot testing for Kreya, expected to come in August. You might want to check it out :)
2 hours ago [-]
antisceptic 4 hours ago [-]
Is that POST in the readme sending the password in the query params? Is this shorthand or literally adding them to the params?
I don't really feel the need for a curl replacement. In the past I've used httpie which is pretty slick but I end up falling back to writing tests in python using requests library.
Maybe I'm not the target audience here, but I should still say something nice I guess. It's nice that it's written in Rust, and open source tooling is in need of fresh projects ever since everyone started bunkering up against the AI monolith scraping all their work. We should celebrate this kind of project, I just wish I had a use for it.
jicea 3 hours ago [-]
The POST in the README is going to send the params in the request body "url form encoded" like a form in a web page. There are more samples on the doc site [1].
Regarding curl, Hurl is just adding some syntax to pass data from request to request and add assert to responses. For a one time send & forget request, curl is the way, but if you've a kind of workflow (like accessing an authentified resource) Hurl is worth a try. Hurl uses libcurl under the hood and you've an option `--curl` to get a list of curl commands.
> The POST in the README is going to send the params in the request body "url form encoded" like a form in a web page.
Is there a different POST request in the readme or are you saying that this example is going to send the "user" and "password" params in the request body?
That seems really surprising to me - how would you then send a POST request that includes query string parameters? The documentation on form parameters [1] suggests there's an explicit syntax for sending form-encoded request parameters
I see it more as a Postman replacement than curl. When I’m working on a set of APIs, I can quickly write a Hurl file with different combinations that I’m working on. There are usually editor integrations to run individual requests. Then I can share the same Hurl file to my team or commit it in the repo.
tra3 3 hours ago [-]
Check out tavern if you’re in python-land. Pretty pleasant way to write declarative API tests.
If I want to open a modal & check something, could it simulate clicking on open modal button? Or is it first level for now (without any support for interactions / javascript magic)
jicea 3 hours ago [-]
Hurl works only on the HTTP layer, there is no JavaScript engine. If your modal open a form that will trigger some kind of XHR, you'll "simulate" the HTTP traquets that the form modal could have done. Hurl is not a kind of Playwright for instance.
molszanski 1 hours ago [-]
I am using it and I love it :)
gabesullice 3 hours ago [-]
This looks awesome. I've searched for something like this many times and made a half dozen half-hearted attempts to build it too. Great job!
globular-toast 47 minutes ago [-]
Can you share "fixtures" amongst tests? For example, I wouldn't want to have to copy/paste the signup and login process for each type of user across hundreds of tests.
What about test isolation? Are people using something else to "prime" the service before/after running these tests?
QuiCasseRien 2 hours ago [-]
interesting tool !
première fois que je vois qqch de cool sortir d'orange.
It gives you full control of constructing requests and assertions because test scenarios may include arbitrary JavaScript.
We had a test suite using Runscope, I hated that changes weren't versioned controlled. Took a little grunt work and I converted them in Hurl (where were you AI?) and got rid of Runscope.
Now we can see who made what change when and why. It's great.
https://marketplace.visualstudio.com/items?itemName=humao.re...
Which is a banger VS Code extension for all sorts of http xyz testing.
It is targeted toward more postman crowd though. May not be as lightweight.
(After I have seen the IntelliJ one from a colleague I was searching for one like that in neovim. That's the best one I found. It's not perfect, but it works.
Edit: The tool from OP looks very neat though. I will try it out. Might be a handy thing for a few prepared tests that I run frequently
Where do you see hurl in the next 2 years?
A favorite of mine is to be available through official `apt`: there has been some work but it's kind of stuck. The Debian integration is the more difficult integration we have to deal. It's not Debian fault, there are a lot of documentation but we've struggled a lot and fail to understand the process.
[1]: https://github.com/Orange-OpenSource/hurl/issues/366
The deficiencies in huel with client state management is not easy to fix.
What I'd like is full client state control with better variable management and use.
For my last project I used Python to write the tests, which appears to work well initially. Dunno how well it will hold up for ongoing maintenance.
TIL! The way I knew to do it was to have a mock implementation that behaved like the real thing, expect for data/time/uuids/..., where there was just a placeholder. Snapshot tests being able to "mask" those non-deterministic parts sounds cool!
I don't really feel the need for a curl replacement. In the past I've used httpie which is pretty slick but I end up falling back to writing tests in python using requests library.
Maybe I'm not the target audience here, but I should still say something nice I guess. It's nice that it's written in Rust, and open source tooling is in need of fresh projects ever since everyone started bunkering up against the AI monolith scraping all their work. We should celebrate this kind of project, I just wish I had a use for it.
Regarding curl, Hurl is just adding some syntax to pass data from request to request and add assert to responses. For a one time send & forget request, curl is the way, but if you've a kind of workflow (like accessing an authentified resource) Hurl is worth a try. Hurl uses libcurl under the hood and you've an option `--curl` to get a list of curl commands.
[1]: https://hurl.dev/docs/samples.html
Is there a different POST request in the readme or are you saying that this example is going to send the "user" and "password" params in the request body?
> POST https://example.org/login?user=toto&password=1234
That seems really surprising to me - how would you then send a POST request that includes query string parameters? The documentation on form parameters [1] suggests there's an explicit syntax for sending form-encoded request parameters
[1]: https://hurl.dev/docs/request.html#form-parameters
[1]: https://github.com/Orange-OpenSource/hurl/issues/4151
https://blog.jetbrains.com/idea/2022/12/http-client-cli-run-...
What about test isolation? Are people using something else to "prime" the service before/after running these tests?
première fois que je vois qqch de cool sortir d'orange.
[1]: https://hurl.dev/docs/manual.html#netrc