java - Gradle: how to list all "given tests" -
i seek next code:
roroco@roroco ~/dropbox/jvs/ro-idea $ gradle test --tests "ro.idea.toggletest.testisad" :ro:compilejava up-to-date :ro:processresources up-to-date :ro:classes up-to-date :ro:jar :compilejava :processresources up-to-date :classes :compiletestjava :processtestresources up-to-date :testclasses :test :ro:compiletestjava up-to-date :ro:processtestresources up-to-date :ro:testclasses up-to-date :ro:test failed failure: build failed exception. * went wrong: execution failed task ':ro:test'. > no tests found given includes: [ro.idea.toggletest.testisad] * try: run --stacktrace alternative stack trace. run --info or --debug alternative more log output.
the output show "no tests found given includes", my question is: how list "given tests" , how specify "given tests"
this old question
i unsure list given tests prior executing since don't believe known until testing executes.
what add together build.gradle
file:
test { beforetest { descriptor -> logger.lifecycle("running test: ${descriptor}") } }
then if go:
gradle clean test
it run tests print out test descriptor before executes providing method(classname)
so:
:test running test: test testc(org.gradle.mysecondtest) running test: test testd(org.gradle.mysecondtest) running test: test testa(org.gradle.myfirsttest) running test: test testb(org.gradle.myfirsttest)
alternatively can run previous command without build.gradle
file alter , @ build/reports/tests/index.html
file show tests run.
so specify single test with:
gradle clean test --tests "org.gradle.myfirsttest.testa"
or tests in class:
gradle clean test --tests "org.gradle.myfirsttest"
or tests in package:
gradle clean test --tests "org.gradle.*"
java testing groovy junit gradle
No comments:
Post a Comment