• Stars
    star
    647
  • Rank 69,106 (Top 2 %)
  • Language
    Go
  • License
    MIT License
  • Created about 10 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A conformance testing tool for HTTP/2 implementation.

h2spec

h2spec is a conformance testing tool for HTTP/2 implementation.
This tool is compliant with RFC 7540 (HTTP/2) and RFC 7541 (HPACK).

Install

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

Your server should respond on GET / or POST / requests with status 200 response with non-empty data.

Usage

Conformance testing tool for HTTP/2 implementation.

Usage:
  h2spec [spec...] [flags]

Flags:
  -c, --ciphers string          List of colon-separated TLS cipher names
      --dryrun                  Display only the title of test cases
      --help                    Display this help and exit
  -h, --host string             Target host (default "127.0.0.1")
  -k, --insecure                Don't verify server's certificate
  -j, --junit-report string     Path for JUnit test report
      --max-header-length int   Maximum length of HTTP header (default 4000)
  -P, --path string             Target path (default "/")
  -p, --port int                Target port
  -S, --strict                  Run all test cases including strict test cases
  -o, --timeout int             Time seconds to test timeout (default 2)
  -t, --tls                     Connect over TLS
  -v, --verbose                 Output verbose log
      --version                 Display version information and exit

Running a specific test case

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 http2

If 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.3

If 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/1

The Spec ID can be specified multiple times.

$ h2spec http2/6.3 generic

Currently 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

Dryrun Mode

To display the list of test cases to be run, use Dryrun Mode as follows:

$ h2spec --dryrun

Strict Mode

When 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 --strict

Screenshot

Sceenshot

Build

To build from source, you need to install Go and export GO111MODULE=on first.

To build:

$ make build

To test:

$ make test

License

h2spec is made available under MIT license.

More Repositories

1

h2a

Debugging reverse proxy for HTTP/2 developers
Go
66
star
2

node-stun

Session Traversal Utilities for NAT (STUN) client for Node.js.
JavaScript
43
star
3

opa-nginx-rbac

A proof of concept for RBAC on nginx with Open Policy Agent
JavaScript
42
star
4

whitebox-controller

Extensible generic controller for Kubernetes
Go
36
star
5

sasazka

Yet another HTTP/2 implementation for Node.js.
JavaScript
21
star
6

node-redis-failover

A Redis client wrapper with automatic master/slave failover solution for Node.js.
JavaScript
16
star
7

vault-plugin-auth-openstack

Vault authentication plugin for OpenStack instance
Go
16
star
8

packer-builder-qemu-chroot

A builder plugin of Packer to support building QEMU images within chroot.
Go
13
star
9

gptask

Performs tasks together with GPT.
Go
12
star
10

etcdap

The experimental LDAP gateway for etcd
Go
12
star
11

l3dsr-packet-forwarder

DSCP based L3DSR packet forwarder using XDP
Python
11
star
12

protospec

A decrelative testing tool for internet protocols
Go
10
star
13

cloudevents-webhook-gateway

HTTP gateway converting webhook requests to CloudEvents.
Go
8
star
14

gh-app-auth

Authenticate with the GitHub App and generate the installation token.
Go
7
star
15

spire-plugin-datastore-k8s

Kubernetes datastore plugin for SPIRE server
Go
7
star
16

cloudevents-feed-notifier

Watch the update of XML feed and notify new entry as CloudEvents.
Go
7
star
17

eventreactor

Event-driven container runner for Kubernetes
Go
6
star
18

terraform-controller

Terraform as a reconciler of Kubernetes resource
Go
5
star
19

the-art-of-webassembly-go

The Art of WebAssembly with Go
Go
5
star
20

github-project-exporter

Export GitHub project status to Prometheus.
Go
4
star
21

secretctl

A CLI based secret management tool.
Go
4
star
22

node-redis-sentinel

Redis Sentinel Client for Node.js
JavaScript
3
star
23

recfriio

Friio Utility for Mac OS X
C
3
star
24

packer-builder-conoha

A builder plugin of Packer for building images with ConoHa.
Go
3
star
25

h2-test-assets

Test assets for HTTP/2 analysis
HTML
2
star
26

discovery.js

The Rendering Engine with HTML5 video and Mocha.
JavaScript
2
star
27

nghttp2-stream-analyzer

The stream analyzer for nghttp2.
JavaScript
2
star
28

node-instagram

The wrapper module of Instagram API for Node.js.
JavaScript
2
star
29

node-http2-hpack

An experimental implementation of HPACK
JavaScript
2
star
30

containers

Container image collection.
Shell
2
star
31

workflow-controller

Kubernetes-centric development workflow.
Go
1
star
32

openstack-nova-authenticator

An instance authenticator for OpenStack
Go
1
star
33

node-fetcher

A URI Fetcher for Node.js
JavaScript
1
star
34

homebrew-http2

HTTP/2 tools and libraries formulae for the Homebrew package manager.
Ruby
1
star
35

node-file-restriction

The file restriction for Node.js.
JavaScript
1
star
36

setup-openstack-environment

Create an environment file with OpenStack metadata information.
Go
1
star