A test suite for Connect that verifies cross-platform conformance for both clients and servers.
The Connect conformance test suite is a series of tests that are run using a client and server to validate interoperability, compatibility, and conformance across the Connect, gRPC, and gRPC-Web protocols. The test suite is meant to exercise various scenarios with a client-server interaction to ensure the results are as expected across platforms.
Tests are divided into two types: client tests and server tests. Those which verify clients are run against a reference server implementation of the Conformance Service written with Connect Go.
Likewise, servers under test will be verified by a reference client implementation of the Conformance Service also written in Connect Go.
To verify compatibility with other protocol implementations, the conformance test also uses reference client and server implementations that use the gRPC-Go module.
Also, please note that this project is currently pre-v1.0.0. As a result, it does not currently make backward compatibility guarantees. The goal is to publish a stable release but please be aware we may make changes as we gather feedback from early adopters.
The conformance runner has the ability to test a client, a server, or both simultaneously. This means that if you are validating both a server and a client, you can use the conformance suite to run them against each other. Testing either a client or server in isolation will use the corresponding reference implementation to verify conformance.
Below are the basic steps needed for setting up the suite to run against your implementation:
-
The first step is to download the Conformance protos, which can be found on the Buf Schema Registry here. From there, you will need to generate the code for the language you are testing.
-
Once complete, you will need to implement either the service, the client, or both (depending on which you are testing). To do so, follow the instructions specified in the
ConformanceServiceproto.For working examples, refer to the Go reference client and reference server.
-
Next, your file should then be made executable in your target language. For example, if implementing the
ConformanceServicein Go, you would build a binary which executes your client or service. -
Finally, visit the repository's Releases page, download the conformance runner binary, and add it to your
$PATH.
The commands for testing will depend on whether you are testing a client, a server, or both.
Specifying which implementation is done via the mode command line argument.
Once you have completed setup, the following commands will get you started:
connectconformance --mode client -- <path/to/your/executable/client>connectconformance --mode server -- <path/to/your/executable/server>To test your client against your server, specify a mode of both, with the client
path first, followed by ----, then the path to your server:
connectconformance --mode both -- <path/to/your/executable/client> ---- <path/to/your/executable/server>To run the suite using the reference client against the reference server and see the process in action, use the following command:
make runconformanceThis will build the necessary binaries and run tests with the following setup:
- Connect reference client against a Connect reference server
- gRPC reference client against a Connect reference server
- Connect reference client against a gRPC reference server
This project is currently pre-v1.0.0. The API should be considered unstable and likely to change.
- connect-go: The Go implementation of Connect
- connect-es: The TypeScript implementation of Connect
- connect-kotlin: The Kotlin implementation of Connect
- connect-swift: The Swift implementation of Connect
- examples-go: Example RPC service powering https://demo.connectrpc.com and built with connect-go
- examples-es: Examples for using Connect with various TypeScript web frameworks and tooling
- connect-playwright-es: Playwright tests for your Connect application
- connect-query-es: TypeScript-first expansion pack for TanStack Query that gives you Protobuf superpowers
For more on Connect, see the announcement blog post, the documentation on connectrpc.com (especially the Getting Started guide for Go), or the demo service.
Offered under the Apache 2 license.