1,992 karma · joined November 20, 2012
https://github.com/jcamiel
GET https://api.foo.net
HTTP/1.1 200
[Asserts]
jsonpath "$.books[0].author.name" == "Hugo"- chaining requests,
- passing data from a request to another (with captures or with cookies, each file being its own cookie session),
- gettings resources and checking payload SHAS
- checking responses (JSONPath, XPath on body response, headers etc...)
- retry / polling scenarios (polls until a resource is created for instance)
- comments things (we use Hurl as documentation for APIs workflows)
You can do these things using scripts and curl of course. We appreciate having a tool that works locally on Windows / macOS / Linux and integrates nicely in CI/CD. Hurl uses a (very small) fragment of libcurl. curl is much much powerfull, we love it.
There are a lot of similar tools (see this thread https://news.ycombinator.com/item?id=33287137#33296902), we try to focus on: simple plain text format, CI/CD integration, fast multi-platform CLI. Plenty of options
Restfox https://restfox.dev/
bruno https://github.com/usebruno/bruno
Hoppscotch https://hoppscotch.io/
HTTP Client https://www.jetbrains.com/help/idea/http-client-in-product-c...
Hurl https://hurl.dev
Insomnia https://github.com/Kong/insomnia
Kreya https://kreya.app
Milkman https://github.com/warmuuh/milkman
Nap https://github.com/davesheldon/nap
restclient.el https://github.com/pashky/restclient.el
REST Client https://github.com/Huachao/vscode-restclient
Socketfox https://socketfox.dev
Step CI https://stepci.com
vim-http-client https://github.com/aquach/vim-http-client
vscode-restclient https://github.com/Huachao/vscode-restclient
The market is overcrowded by good solutions, best wishes to other tools!
Given the raise of CI/CD, I really think these kind of tools (CLI tests on HTTP requests), based on a simple format, will be really important. We've build Hurl (https://github.com/Orange-OpenSource/hurl), that shares a lot of similarities with Step CI (plain text instead of yaml, captures, jsonpath, xpath etc...). I will shamelessly take inspiration for some new features (like GraphQL for instance)!
[profile.release]
lto = true # Enable Link Time Optimization
codegen-units = 1 # Reduce number of codegen units to increase optimizations.
panic = "abort" # Abort on panic
strip = true # Automatically strip symbols from the binary.[1]: https://github.com/Orange-OpenSource/hurl
[2]: https://daniel.haxx.se/blog/2020/12/17/curl-supports-nasa/
https://m.youtube.com/playlist?list=PLACMSh_URlEcwVqYAoOP-uy...
On the other hand, you can also easily test use cases where the browser is “helping” you (for instance, you want to test that your backend didn’t accept an invalid email, but your HTML form has HTML5 validation that prevents a user to enter an invalid email). Or you want to test HttpsOnly cookie attributes. But it can’t do UI integration tests.
It’s as if you would test your app with curl, very fast and reliable. On the other hand, contrary to Selenium, there is no Javascript engine so you can only test the “raw” DOM or json response sent by the network (and not a DOM managed and rendered by a Javascript front end framework).
(Disclaimer: I’m one of Hurl maintainer)
[1]: https://hurl.dev
[1] https://hurl.dev
I’ve been an iOS developper for 8 years (working on apps with millions of downloads, for a French company).
I’ve been fighting management constantly about this, explaining that it would be cheaper to have iOS and Android experts ratherg than « multiplatform » developers. For instance, on iOS side, frameworks and UI change a lot every years, so you want to be able to update your apps quickly and adopt the new best practices (which is easier if you stick to the standard UI without any other framework).
We had other projects that started with a multiplatform approach, to go back after sometimes on « real » native apps (by real, I mean using only standard SDK, UIKit on iOS for instance). Despite these failures, management keep pushing for technology like React Native, Xamarin etc…
I’ve lost this battle: I think that the idea to have half devs is to appealing to business, and you don’t have chance to explain why this is not as simple as it’s seems to be. Or my points were simply not convincing.
« new inventions
Here are some tools that are not exactly replacements for standard tools:»
[1] https://hurl.dev
Three years ago, our stack was Spring + Java. Now, we have transitioned our app to Spring Boot and Kotlin and I begin to appreciate this stack. No xml configuration, only code (or, more precisely, annotations that rely on reflexion), Kotlin data class for model, simple controller etc... I quite like it.
I come from a Python backend background with a lot of misconceptions about Java/Spring, and I like that our app can be bundled in a single "fat Jar" with all its dependencies. Much more pleasant (in my option) that the Python deployment story.
One think that I still dislike is the MVC template engines (we use Thymeleaf): they fill "ancient" to me and I would welcome something more "static" (like a Kotlin dsl for instance).
With Java 17, the gap is narrowing between Kotlin and Java. Kotlin has still unique features that I love (extension methods for instance), but the big one is nullability. You can use @Nullable/@NotNull annotations in Java but I largely prefer having nullability backed in types with Kotlin. Some people say nullability is not a problem: with 30 developers of various quality, I can ensure it is a problem. I don’t see Java addressing nullability in a better way in the near future, so I’m going to stick with Kotlin.
"Why Most Unit Testing is Waste" https://rbcs-us.com/documents/Why-Most-Unit-Testing-is-Waste...
Why Hurl?
- Text Format: for both devops and developers
- Fast CLI: a command line for local dev and continuous integration
- Single Binary: easy to install, with no runtime required
It’s maybe too succinct, but, at least, it’s here! We have also a more detail view on our FAQ [3]
[1] https://hurl.dev/#why-hurl
[2] https://github.com/Orange-OpenSource/hurl#why-hurl
[3] https://hurl.dev/docs/frequently-asked-questions.html#yet-an...