Conformance tests

41 views
Skip to first unread message

Luciano Joublanc

unread,
Dec 19, 2022, 6:22:37 AM12/19/22
to Protocol Buffers
I can't find any documentation on the main website on conformance testing, for example when developing encoders for a new language.

The only link I see is to the tests in protoscope. It also seems that each official language implementation has it's own set of unit tests.

Is there some set of 'standard' tests that all these codecs use in common to ensure conformance?

Luciano Joublanc

unread,
Dec 19, 2022, 10:49:59 AM12/19/22
to Protocol Buffers
So I can see that the C++ `src/google/protobuf` directory has a number of unittest*.proto files. Is there any documentation around this? I'm particularly interested in testing encoding/decoding rather than parsing.

Deanna Garcia

unread,
Dec 27, 2022, 3:51:43 PM12/27/22
to Protocol Buffers
There is some documentation in https://github.com/protocolbuffers/protobuf/blob/main/conformance/README.md. In general, most languages use some of the shared unittests that you found in `src/google/protobuf` and then have a few custom tests of their own.

For encoding/decoding, you'd probably want wire_format_unittest.inc.
Reply all
Reply to author
Forward
0 new messages