Spark vs Hurl

Hurl and Spark are both CLI-first, text-based testing tools. They are more complementary than competitive — Hurl tests HTTP endpoints, Spark orchestrates the entire test environment.

Quick comparison

SparkHurl
Primary useIntegration testing with real servicesHTTP request testing
Test formatYAML (.spark files)Plain text (.hurl files)
Starts real servicesYes — Docker containersNo — services must be running
HTTP assertionsstatusCode, jsonPath, snapshotstatusCode, headers, body, jsonpath, xpath, regex
Request chainingVia setup stepsNative (capture & reuse values)
Performance testingNoYes (response time assertions)
Parallel executionBuilt-inNo
CI/CD reportsHTML + JUnit XMLHTML + JUnit XML + TAP
Binary size~15MB~5MB
Written inGoRust

When to use Hurl

  • Your services are already running (staging environment, local dev server)
  • You need pure HTTP testing — request chains, value capture, regex matching
  • You want the lightest possible tool — single binary, no Docker dependency
  • You need response time assertions for performance testing
  • Your tests are only HTTP — no CLI commands, no service orchestration

When to use Spark

  • You need to start services for each test — databases, APIs, caches
  • You want test isolation — each test in its own Docker network
  • You need parallel execution across multiple workers
  • Your tests include CLI commands alongside HTTP requests
  • You want artifact collection from service containers (logs, files)

Side by side

Hurl — tests HTTP only, assumes services exist:

POST http://localhost:8080/api/login
Content-Type: application/json
{"email": "test@test.com", "password": "secret"}

HTTP 200
[Asserts]
jsonpath "$.token" exists

Spark — starts services, tests HTTP, cleans up:

name: Login API

tests:
  - name: Login returns token
    services:
      - name: db
        image: postgres:15
        healthcheck: "pg_isready"
      - name: api
        image: myapp:latest
    execution:
      target: http://api:8080
      request:
        method: POST
        url: /api/login
        body: '{"email": "test@test.com", "password": "secret"}'
    assertions:
      - statusCode:
          equals: 200
      - jsonPath:
          path: $.token
          expected: exists

Where Hurl wins

  • Lighter weight — single ~5MB binary, no Docker dependency, instant startup
  • Elegant HTTP syntax — plain text that reads like a curl command
  • Request chaining — capture a token from one response, use it in the next request natively
  • Performance assertions — assert response time directly (duration < 500)
  • Richer HTTP assertions — XPath, regex, SHA-256 body hash, cookie assertions

Where Spark wins

  • Service lifecycle — starts and stops Docker containers as part of the test
  • Test isolation — each test gets its own network, no shared state
  • Parallel execution — run entire suites concurrently
  • CLI testing — test command-line tools, not just HTTP endpoints
  • Artifact collection — extract logs and files from containers automatically

Can they coexist?

Absolutely. Some teams use Hurl for quick HTTP smoke tests against staging and Spark for full integration tests that need real services. Different tools for different layers.