A conformance testing tool for HTTP/2 implementation.
h2spec is a conformance testing tool for HTTP/2 implementation.
This tool is compliant with RFC 7540 (HTTP/2) and RFC 7541 (HPACK).
Go to the releases page, find the version you want, and download the zip file or tarball file. The docker image is also available in Docker Hub.
Your server should respond on GET / or POST / requests with status 200 response with non-empty data.
…You can choose a test case to run by specifying the Spec ID as the command argument. For example, if you want to run test cases for HTTP/2, run h2spec as following:
$ h2spec http2If you add a section number after the Spec ID, test cases related to a specific section will be run. For example, if you want to run test cases related to 6.3 of HTTP/2, run h2spec as following:
$ h2spec http2/6.3If you add a test number after the section number, you can run the specific test case individually. For example, to run only the first test case related to 6.3 of HTTP/2 6.3, run h2spec as following:
$ h2spec http2/6.3/1The Spec ID can be specified multiple times.
$ h2spec http2/6.3 genericCurrently supported Spec IDs are as follows. generic is the original spec of h2spec, includes generic test cases for HTTP/2 servers.
| Spec ID | Description |
|---|---|
| http2 | Test cases for RFC 7540 (HTTP/2) |
| hpack | Test cases for RFC 7541 (HPACK) |
| generic | Generic test cases for HTTP/2 servers |
To display the list of test cases to be run, use Dryrun Mode as follows:
$ h2spec --dryrunWhen Strict Mode is enabled, h2spec will run the test cases related to the contents requested with the SHOULD notation in each specification. It is useful for more rigorous verification of HTTP/2 implementation.
$ h2spec --strictTo build from source, you need to install Go and export GO111MODULE=on first.
To build:
$ make buildTo test:
$ make testh2spec is made available under MIT license.
No open issues yet, or sync has not completed.