-
Notifications
You must be signed in to change notification settings - Fork 2
4. Custom Executable JAR
James Crocker edited this page Nov 12, 2016
·
5 revisions
- You have maven, Java 1.8+ or OpenJDK-8 installed. See Eclipse IDE HowTo
- You've downloaded the COSENG git project
- You've added your application specific TestNG/Selenium test classes in a sub-package. eg.
com.sios.stc.coseng.tests.myWebApp
- TestNG suite XML created with the test classes you want to test. Example classes.xml
- COSENG Tests JSON created with the locaion, platform, browser and other details specific to your test case. Created in project's
src/main/resources/coseng/tests
. Example multiple-suites.json - [Optional] COSENG Node JSON for web driver executable paths and alternate temporary and report directories specific to your environment. Created in project's
src/main/resources/coseng/config
.java -jar coseng-2.1.0-jar-with-dependencies.jar -help
for Node JSON example. - Run your tests with appropriate arguments to confirm expected behavior. eg.
-node coseng/config/myNode.json -tests coseng/tests/myTests.json
- Build the custom executable COSENG jar:
mvn clean package
- The custom executable jar will be found at:
target/coseng-2.1.0-jar-with-dependencies.jar
. JavaDoc, sources and coseng (w/o dependencies) jars also created. - Run your tests!
java -jar coseng-2.1.0-jar-with-dependencies.jar -node coseng/config/myNode.json -tests coseng/tests/myTests.json
- Now you can copy just one self contained jar to any supported platform and execute your tests!