Skip to main content
hitspec is a file-based HTTP API testing tool that emphasizes simplicity and readability. Write your API tests in plain text files that look like actual HTTP requests.
GET https://api.example.com/users

>>>
expect status 200
expect body type array
expect body[0].id exists
<<<
No SDK. No GUI. No JavaScript. Just plain text .http files you can read, diff, and check into git.

Why hitspec?

Plain Text

Tests are readable .http files. No binary formats, no JSON blobs, no GUI-only workflows.

Version Control Friendly

Every test is a text file. Diffs are meaningful. Code review works naturally.

Full Test Framework

26 assertion operators, variable captures, request dependencies, retries, and more.

Built-in Load Testing

Stress test your APIs with --stress. No separate tool needed.

How hitspec Compares

Toolhitspec Advantage
PostmanPlain text files, version-controllable, no GUI needed
REST Client (VSCode)Adds assertions, captures, dependencies, stress testing
curlFull test framework on top of HTTP requests
k6Simpler syntax, no JavaScript required for basic tests
HurlBuilt-in stress testing, DB assertions, mock server, import/export
newmanSimpler file format, no collection export needed

Feature Highlights

Assertions

26 operators including ==, contains, matches, exists, type, schema, snapshot, and more.

Captures and Dependencies

Chain requests by capturing response values and controlling execution order with @depends.

Environments

Define dev, staging, and prod configurations in a single hitspec.yaml file.

Multiple Output Formats

Console, JSON, JUnit XML, TAP, and HTML output for CI/CD integration.

Stress Testing

Load test with configurable rate, virtual users, ramp-up, and pass/fail thresholds.

Mock Server

Start a mock server from your .http files for frontend development and testing.

Database Assertions

Verify database state after requests with >>>db blocks. Supports PostgreSQL, MySQL, and SQLite.

CI/CD Ready

Official GitHub Action, JUnit output, environment variables, and exit codes that just work.

What’s in a Test File?

A hitspec test file is a plain text .http file containing one or more requests with optional assertions and captures:
@baseUrl = https://jsonplaceholder.typicode.com

### Create a post
# @name createPost

POST {{baseUrl}}/posts
Content-Type: application/json

{
  "title": "Hello hitspec",
  "body": "Testing made simple",
  "userId": 1
}

>>>
expect status 201
expect body.id exists
<<<

>>>capture
postId from body.id
<<<

### Verify the post was created
# @depends createPost

GET {{baseUrl}}/posts/{{createPost.postId}}

>>>
expect status 200
expect body.title == "Hello hitspec"
<<<
hitspec files use the .http or .hitspec extension. The .http format is compatible with REST Client and other HTTP file tools, so you get syntax highlighting for free.