The junit5-slick-sample project demonstrates how to run tests based on JUnit
Jupiter and report results to slick using slickqa-junit-jupiter extensions.
There are two seperate examples of running tests in this project. For both examples be sure to set the slick instance where tests will report: -Dslick.baseurl=<Slick Instance Base URL> (Example: "http://slick.yourcompany.com")
-
Running tests with gradle.
- Tests will run with
./gradlew buildor./gradlew testWhen building gradle will skip testing if they've already been run unless changes are detected. - System properties needed for Slick can easily be set in your gradle build file. "slick.build" is an example of a system property that comes from an environment variable"
test { // Set these to report to slick. You'll notice we get the build from an environment variable //systemProperty "slick.scheduleTests", "false" //systemProperty "slick.baseurl", "http://slick.mycompany.com" //systemProperty "slick.project", "coolProject" //systemProperty "slick.release", "releaseName" //systemProperty "slick.build", System.getenv("BUILD") //systemProperty "slick.testplan", "testplanName" useJUnitPlatform() testLogging { events "passed", "skipped", "failed" } } - Tests will run with
-
Packaging an executable jar and running tests from main.
- compile and create the jar just by building. jar location is
build/libs/junit5-slick-sample.jar - An example of running the jar:
java -Dslick.scheduleTests=false -Dslick.baseurl=http://slick.mycompany.com -Dslick.project=projectName -Dslick.release=releaseName -Dslick.build=1 -Dslick.testplan=testplanName -jar build/libs/junit5-slick-sample.jar - compile and create the jar just by building. jar location is