I would like to be able to run integration tests for a Java client/server (using embedded jetty). In addition I would like to be able to mix-and-match different server and client source code versions during the integration testing.
I am wondering what the best git or maven version strategy to accomplish this:
-
Using the same git repository for the client and the server, it would be difficult to checkout code of various server versions and test it against code of various client versions.
-
Using separate git repositories (1st repository with client src and integration tests, 2nd repository with server src) – It would also require to checkout both repositories to run the integration tests, and assume relative paths between them.
-
Testing the client src code only against maven-version server WAR, may result in honest mistakes of developers running tests against a server WAR that does not match the checked-out server source code.
I suggest keeping the process simple, as you have enough variables going on already without introducing potential git management issues. To that end, I would avoid submodules. I would instead give the developers clear pairings of branches/tags to test for both the client and server repos in your testing matrix.
Use tags so you can more easily reuse and repeat the same tests in your matrix again in the future, especially after bugs have been fixed from the first round.
In short, I recommend your solution #2. The relative paths assumption is preferable to the potential confusion introduced by submodules.