I have several unit tests and component tests that I would like to test against several versions of Java (1.6, 1.7, 1.8, etc.).
I wonder what his best methodology is?
Do I have to run tests several times using Jenkins and every time I change the path of the JAVA_HOME variable to another JRE?
Can I use the Maven plugin? Maybe different profiles?
Also, is there a way to use TestNG to exclude tests based on the JRE version? I can handle this using the if statement in the java.version system property, however, I wonder if the style is more elegant.
In case this affects the answer, I would like to mention that, looking to the future, I would like to test it against several types of OS and several versions of the product (the same tests against v1.0, v2.0, etc. )
java unit-testing integration-testing testng automated-tests
nadavy
source share