diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2016-05-17 15:13:59 -0700 |
---|---|---|
committer | Feng Xiao <xfxyjwf@gmail.com> | 2016-05-17 15:13:59 -0700 |
commit | 4f630a68574027e7f4215bcefcaf5b11a8bb507e (patch) | |
tree | 540d8751f3dbad33f912b3471aedc458873b4013 /java/compatibility_tests/README.md | |
parent | c8be6ee00c3afd59aee970a8c648099d78bdd576 (diff) |
Add compatiblity tests against v2.5.0
Diffstat (limited to 'java/compatibility_tests/README.md')
-rw-r--r-- | java/compatibility_tests/README.md | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/java/compatibility_tests/README.md b/java/compatibility_tests/README.md new file mode 100644 index 00000000..3a61e856 --- /dev/null +++ b/java/compatibility_tests/README.md @@ -0,0 +1,46 @@ +# Protobuf Java Compatibility Tests + +This directory contains tests to ensure protobuf library is compatible with +previously released versions. + +## Directory Layout + +For each released protobuf version we are testing compatiblity with, there +is a sub-directory with the following layout (take v2.5.0 as an example): + + * v2.5.0 + * test.sh + * pom.xml + * protos/ - unittest protos. + * more_protos/ - unittest protos that import the ones in "protos". + * tests/ - actual Java test classes. + +The testing code is extracted from regular protobuf unittests by removing: + + * tests that access package private methods/classes. + * tests that are known to be broken by an intended behavior change (e.g., we + changed the parsing recursion limit from 64 to 100). + * all lite runtime tests. + +It's also divided into 3 submodule with tests depending on more_protos and +more_protos depending on protos. This way we can test scenarios where only part +of the dependency is upgraded to the new version. + +## How to Run The Tests + +Before running the tests, make sure you have already built the protoc binary +following [the C++ installation instructions](../../src/README.md). The test +scripts will use the built binary located at ${protobuf}/src/protoc. + +To start a test, simply run the test.sh script in each version directory. For +example: + + $ v2.5.0/test.sh + +For each version, the test script will test: + + * only upgrading protos to the new version + * only upgrading more_protos to the new version + +and see whether everything builds/runs fine. Both source compatibility and +binary compatiblity will be tested. |