Hurl

Hurl

WHAT IS IT?

Hurl is a Rust binary that reads .hurl files - a minimalist text format for describing HTTP requests - and executes them sequentially. Each request can include assertions on the response (status code, headers, body via JSONPath or XPath) and capture values to inject into subsequent requests. Under the hood, libcurl handles the networking, which means solid support for HTTP/1.1, HTTP/2, HTTP/3 and IPv6.

The .hurl format is deliberately simple: one request = one method, one URL, optional sections. No programming language, no complex DSL. The file reads like an HTTP conversation.

GET https://api.example.com/health
HTTP 200
[Asserts]
jsonpath "$.status" == "ok"

POST https://api.example.com/login
{
    "user": "admin",
    "password": "secret"
}
HTTP 200
[Captures]
token: jsonpath "$.token"

GET https://api.example.com/protected
Authorization: Bearer {{token}}
HTTP 200

WHY IS IT INTERESTING?

It's plain text, period. .hurl files are versioned in Git, easy to diff, painless to review. No binary format or unreadable JSON like Postman collections.

Assertions are built in. No need to script your own JSON parser. JSONPath, XPath, regex, header checks, cookie inspection, SSL certificate validation, response duration - all part of the syntax. A failed assertion means a non-zero exit code. Simple.

Chaining is natural. Capture an auth token, a resource ID, a session cookie, then re-inject it into following requests with {{variable}}. This is the standard workflow for testing a complete flow.

CI/CD without friction. Hurl generates reports in JUnit XML, TAP, JSON and HTML. It plugs into any pipeline without adapters. A static binary, zero runtime dependencies, available via apt, brew, cargo, npm, conda or Docker.

Retry and polling. For integration tests that depend on an async service, Hurl supports retry with configurable intervals and stop conditions based on assertions.

USE CASES

  • REST, SOAP or GraphQL API integration tests in CI pipelines
  • Post-deployment smoke tests with assertions on critical endpoints
  • Replacing Postman collections with versionable, reviewable files
  • Validating multi-step flows: authentication, CRUD, verification
  • Lightweight endpoint monitoring with response time checks