# gavv/httpexpect

End-to-end HTTP and REST API testing for Go.

Repository: https://github.com/gavv/httpexpect
Canonical: https://ross.abutalabs.com/products/httpexpect
Homepage: https://pkg.go.dev/github.com/gavv/httpexpect/v2
Language: Go
License: MIT
License Family: permissive
Topics: http, rest, json, websocket, testing, assertions
Last push: 2025-11-20T02:03:19+00:00

## Health v2 (maintenance only)
Score: 47/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 53, release rhythm 8, longevity 100
- inputs: {"age_days": 3778, "days_push": 287, "days_rel": 547, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2725, forks 242 (observed 2026-08-28T04:07:15.783943+00:00)

## What it is
httpexpect is a Go library providing concise, declarative end-to-end HTTP and REST API testing via chainable request builders and response/payload assertions. It supports JSON, forms, JSON Schema validation, JSONPath queries, and WebSocket testing on top of net/http.

## Use cases
- test REST API endpoints in Go
- assert HTTP response status headers and JSON payloads
- validate API responses against JSON Schema
- test WebSocket servers from Go
- write end-to-end tests for HTTP services
- query JSON responses with JSONPath in tests

## When to choose
- you write Go tests for HTTP/REST APIs and want fluent, chainable assertions
- you need JSON Schema validation or JSONPath queries inside API tests
- you want readable failure output with JSON diffs and testify integration

## When to avoid
- you test non-HTTP protocols or need load/performance testing rather than functional testing
- your stack is not Go
- you only need a plain HTTP client without assertion helpers

## Facets
- artifact type: library
- maturity: stable
- function: testing, e2e-testing, http-client, websocket
- domain: testing, apis, web-development, developer-tools
- platform: go, cli
- tags: http-testing, rest-api, assertions, json-schema, jsonpath, declarative

## Member repositories
- gavv/httpexpect (main) score 47

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:15.783943+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:14:49.554125+00:00, confidence not recorded.
  - readme: https://github.com/gavv/httpexpect (fetched 2026-08-28T04:07:15.783943+00:00, sha 0665ba0d2620)
  - homepage: https://pkg.go.dev/github.com/gavv/httpexpect/v2 (fetched 2026-08-29T09:57:55.906911+00:00, sha dd2c509d3772)
  - site_page: https://pkg.go.dev/about (fetched 2026-08-29T09:57:55.911627+00:00, sha 757852027879)
- Data as of 2026-08-30T08:39:29.467469+00:00.
