summerwind / h2spec

A conformance testing tool for HTTP/2 implementation.
MIT License
665 stars 75 forks source link

client tests? #17

Open kazuho opened 9 years ago

kazuho commented 9 years ago

As of now, h2spec is only capable of testing servers, acting as a client. IMO it would be great if h2spec could be run as a server, so that it could be used as a tool to test client implementations.

summerwind commented 9 years ago

I agree with your opinion.

I thought about test cases for the client side before. But it seemed difficult to implement than server side tests. We have to consider the URL for clients that request. This is why I've been put off implementation.

But now h2spec has the almost test cases for the server side. So I'm going to implement the client side test cases on the future version :-)

kazuho commented 9 years ago

Delighted to hear that!

There would be technical challenges for sure, but I am confident the client developers would be delighted if h2spec could be applied for testing their implementation, as the tool has been very helpful for polishing up H2O.

Lukasa commented 9 years ago

Speaking for client developers, yeah, we'd be delighted! =D

Karm commented 8 years ago

Dear @Lukasa, could you share what you ended up using?

kazu-yamamoto commented 8 years ago

IIJ-II has an intern student to develop h2specd in this summer. We hope that we can release it two months later.

CrowdHailer commented 7 years ago

Was there any progress on this.

kazu-yamamoto commented 7 years ago

Please ping @Certerazvi:

https://github.com/Certerazvi/h2specd

chhsiao90 commented 7 years ago

I had implement the client tests with #74 , that reuse the exists tests already exists in h2spec and changed to the client version tests.

But I just found that currently it only works fine on browser, but not for command line based client, like nghttp. I think it's a bug when I implement the port-based test case instead of path-based test case by 6403404ab1679a4effd698f23b13e59c34d367b8.

ghost commented 6 years ago

@chhsiao90 any plans to make it work for command-line clients?

chhsiao90 commented 6 years ago

It's already supported by --exec

For example, you can add --exec nghttp, and h2spec will execute nghttp https://127.0.0.1:xxxx for each test case.

ghost commented 6 years ago

Ah ok, thank you. I did not know about the --exec flag. Awesome! I love you!

essen commented 6 years ago

I started using h2specd to test my client. Works great! Thanks! https://github.com/ninenines/gun/blob/master/test/h2specd_SUITE.erl

Two nitpicks: I have to use browser mode and issue the requests from my test suite rather than rely on --exec but did not find a way to stop the program once I'm done, had to resort to using kill. I also didn't find a way to get a text/plain report, the HTML would be fine for the HTML reports but not for the shell output.

Back to fixing bugs...

kunalekawde commented 5 years ago

I've a C++ client built using libcurl + nghttp2, can i use h2specd to verify this ?

kunalekawde commented 5 years ago

I've a C++ client built using libcurl + nghttp2, can i use h2specd to verify this ?

I was able to test this working. created a test test exec and used --exec option. Thanks