Back to articles
Hurl Has a Free API: Test HTTP APIs With Plain Text Files
How-ToDevOps

Hurl Has a Free API: Test HTTP APIs With Plain Text Files

via Dev.to DevOpsAlex Spinov

Hurl is a command-line tool for running HTTP requests defined in plain text. Think cURL but with assertions, variables, and chaining for API testing. Why Hurl Matters Postman is heavy. cURL is hard to read. Hurl files are plain text that anyone can understand, version in git, and run in CI/CD. What you get for free: Plain text HTTP request files Built-in assertions (status, headers, body, JSONPath) Variable capture and chaining Cookie and session handling Run in CI/CD (exit code on failure) HTML and JUnit test reports Quick Start curl -fsSL https://hurl.dev/install.sh | sh hurl api-tests.hurl hurl --test --report-html report/ api-tests.hurl Basic Request GET http://localhost:8080/api/users HTTP 200 [Asserts] header "Content-Type" contains "application/json" jsonpath "$" count > 0 jsonpath "$[0].name" exists POST http://localhost:8080/api/users Content-Type: application/json { "name": "Alice", "email": "alice@example.com" } HTTP 201 [Captures] user_id: jsonpath "$.id" [Asserts] jsonpath

Continue reading on Dev.to DevOps

Opens in a new tab

Read Full Article
6 views

Related Articles