Gradle (Kotlin DSL) tests not executed
I have a multi project setup, but would like to run a test in a subproject.
My file structure follows conventions:
+ common-scripting
+ src
+ main
+ kotlin
+ resources
+ test
+ kotlin
+ scripting
+ ValueTest.kt
+ resources
In my ValueTest.kt I have a dummy test case:
package scripting
import org.testng.Assert.assertTrue
import org.testng.annotations.Test
class ValueTest
@Test
fun testIt()
assertTrue(false)
My build script is this:
repositories
mavenCentral()
plugins
kotlin("jvm")
java
dependencies
compile(kotlin("stdlib-jdk8"))
compile(kotlin("script-runtime"))
compile(kotlin("script-util"))
compile(kotlin("compiler-embeddable"))
testImplementation("org.testng:testng:6.14.3")
However, when I run the tests:
> gradlew.bat --info :common-scripting:cleanTest :common-scripting:test
> Task :common-scripting:clean
Task ':common-scripting:clean' is not up-to-date because:
Task has not declared any outputs despite executing actions.
> Task :common-scripting:compileKotlin
Task ':common-scripting:compileKotlin' is not up-to-date because:
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlinmain has been removed.
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlinmainMETA-INF has been removed.
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlinmainMETA-INFcommon-scripting.kotlin_module has been removed.
All input files are considered out-of-date for incremental task ':common-scripting:compileKotlin'.
Using Kotlin incremental compilation
Options for KOTLIN DAEMON: IncrementalCompilationOptions(super=CompilationOptions(compilerMode=INCREMENTAL_COMPILER, targetPlatform=JVM, reportCategories=[0], reportSeverity=2, requestedCompi
lationResults=[0]), areFileChangesKnown=false, modifiedFiles=null, deletedFiles=null, workingDir=C:balagegitrlog_legacy_rlogcommon-scriptingbuildkotlincompileKotlin, customCacheVersio
nFileName='gradle-format-version.txt', customCacheVersion=4, multiModuleICSettings=MultiModuleICSettings(buildHistoryFile=C:balagegitrlog_legacy_rlogcommon-scriptingbuildkotlincompile
Kotlinbuild-history.bin, useModuleDetection=false), usePreciseJavaTracking=truelocalStateDirs=[C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlinmain])
> Task :common-scripting:compileJava NO-SOURCE
Skipping task ':common-scripting:compileJava' as it has no source files and no previous output files.
> Task :common-scripting:processResources
Task ':common-scripting:processResources' is not up-to-date because:
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildresourcesmain has been removed.
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildresourcesmainMETA-INF has been removed.
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildresourcesmainMETA-INFservices has been removed.
> Task :common-scripting:classes
Skipping task ':common-scripting:classes' as it has no actions.
> Task :common-scripting:compileTestKotlin
Task ':common-scripting:compileTestKotlin' is not up-to-date because:
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlintest has been removed.
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlintestMETA-INF has been removed.
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlintestMETA-INFcommon-scripting.kotlin_module has been removed.
All input files are considered out-of-date for incremental task ':common-scripting:compileTestKotlin'.
Using Kotlin incremental compilation
Options for KOTLIN DAEMON: IncrementalCompilationOptions(super=CompilationOptions(compilerMode=INCREMENTAL_COMPILER, targetPlatform=JVM, reportCategories=[0], reportSeverity=2, requestedCompi
lationResults=[0]), areFileChangesKnown=false, modifiedFiles=null, deletedFiles=null, workingDir=C:balagegitrlog_legacy_rlogcommon-scriptingbuildkotlincompileTestKotlin, customCacheVe
rsionFileName='gradle-format-version.txt', customCacheVersion=4, multiModuleICSettings=MultiModuleICSettings(buildHistoryFile=C:balagegitrlog_legacy_rlogcommon-scriptingbuildkotlincom
pileTestKotlinbuild-history.bin, useModuleDetection=false), usePreciseJavaTracking=truelocalStateDirs=[C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlintest])
> Task :common-scripting:compileTestJava NO-SOURCE
Skipping task ':common-scripting:compileTestJava' as it has no source files and no previous output files.
> Task :common-scripting:processTestResources
Task ':common-scripting:processTestResources' is not up-to-date because:
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildresourcestest has been removed.
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildresourcestestempty.txt has been removed.
> Task :common-scripting:testClasses
Skipping task ':common-scripting:testClasses' as it has no actions.
> Task :common-scripting:test
Task ':common-scripting:test' is not up-to-date because:
Output property 'binResultsDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildtest-resultstestbinary has been removed.
Output property 'binResultsDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildtest-resultstestbinaryoutput.bin has been removed.
Output property 'binResultsDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildtest-resultstestbinaryoutput.bin.idx has been removed.
Finished generating test XML results (0.0 secs) into: C:balagegitrlog_legacy_rlogcommon-scriptingbuildtest-resultstest
Generating HTML test report...
Finished generating test html results (0.009 secs) into: C:balagegitrlog_legacy_rlogcommon-scriptingbuildreportsteststest
BUILD SUCCESSFUL in 4s
12 actionable tasks: 6 executed, 6 up-to-date
It runs, even executes the test task, but none of the tests are executed. I checked the source directory configuration in IDEA, and the test path is included, so IDEA detects them.
What did go wrong?
When I try to execute tests from IDEA, it gives the following error:
> Task :common-scripting:test FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':common-scripting:test'.
> No tests found for given includes: [scripting.ValueTest](filter.includeTestsMatching)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
12 actionable tasks: 2 executed, 10 up-to-date
No tests found for given includes: [scripting.ValueTest](filter.includeTestsMatching)
17:09:04: Tasks execution finished ':common-scripting:cleanTest :common-scripting:test --tests "scripting.ValueTest"'.
gradle gradle-kotlin-dsl
add a comment |
I have a multi project setup, but would like to run a test in a subproject.
My file structure follows conventions:
+ common-scripting
+ src
+ main
+ kotlin
+ resources
+ test
+ kotlin
+ scripting
+ ValueTest.kt
+ resources
In my ValueTest.kt I have a dummy test case:
package scripting
import org.testng.Assert.assertTrue
import org.testng.annotations.Test
class ValueTest
@Test
fun testIt()
assertTrue(false)
My build script is this:
repositories
mavenCentral()
plugins
kotlin("jvm")
java
dependencies
compile(kotlin("stdlib-jdk8"))
compile(kotlin("script-runtime"))
compile(kotlin("script-util"))
compile(kotlin("compiler-embeddable"))
testImplementation("org.testng:testng:6.14.3")
However, when I run the tests:
> gradlew.bat --info :common-scripting:cleanTest :common-scripting:test
> Task :common-scripting:clean
Task ':common-scripting:clean' is not up-to-date because:
Task has not declared any outputs despite executing actions.
> Task :common-scripting:compileKotlin
Task ':common-scripting:compileKotlin' is not up-to-date because:
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlinmain has been removed.
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlinmainMETA-INF has been removed.
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlinmainMETA-INFcommon-scripting.kotlin_module has been removed.
All input files are considered out-of-date for incremental task ':common-scripting:compileKotlin'.
Using Kotlin incremental compilation
Options for KOTLIN DAEMON: IncrementalCompilationOptions(super=CompilationOptions(compilerMode=INCREMENTAL_COMPILER, targetPlatform=JVM, reportCategories=[0], reportSeverity=2, requestedCompi
lationResults=[0]), areFileChangesKnown=false, modifiedFiles=null, deletedFiles=null, workingDir=C:balagegitrlog_legacy_rlogcommon-scriptingbuildkotlincompileKotlin, customCacheVersio
nFileName='gradle-format-version.txt', customCacheVersion=4, multiModuleICSettings=MultiModuleICSettings(buildHistoryFile=C:balagegitrlog_legacy_rlogcommon-scriptingbuildkotlincompile
Kotlinbuild-history.bin, useModuleDetection=false), usePreciseJavaTracking=truelocalStateDirs=[C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlinmain])
> Task :common-scripting:compileJava NO-SOURCE
Skipping task ':common-scripting:compileJava' as it has no source files and no previous output files.
> Task :common-scripting:processResources
Task ':common-scripting:processResources' is not up-to-date because:
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildresourcesmain has been removed.
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildresourcesmainMETA-INF has been removed.
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildresourcesmainMETA-INFservices has been removed.
> Task :common-scripting:classes
Skipping task ':common-scripting:classes' as it has no actions.
> Task :common-scripting:compileTestKotlin
Task ':common-scripting:compileTestKotlin' is not up-to-date because:
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlintest has been removed.
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlintestMETA-INF has been removed.
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlintestMETA-INFcommon-scripting.kotlin_module has been removed.
All input files are considered out-of-date for incremental task ':common-scripting:compileTestKotlin'.
Using Kotlin incremental compilation
Options for KOTLIN DAEMON: IncrementalCompilationOptions(super=CompilationOptions(compilerMode=INCREMENTAL_COMPILER, targetPlatform=JVM, reportCategories=[0], reportSeverity=2, requestedCompi
lationResults=[0]), areFileChangesKnown=false, modifiedFiles=null, deletedFiles=null, workingDir=C:balagegitrlog_legacy_rlogcommon-scriptingbuildkotlincompileTestKotlin, customCacheVe
rsionFileName='gradle-format-version.txt', customCacheVersion=4, multiModuleICSettings=MultiModuleICSettings(buildHistoryFile=C:balagegitrlog_legacy_rlogcommon-scriptingbuildkotlincom
pileTestKotlinbuild-history.bin, useModuleDetection=false), usePreciseJavaTracking=truelocalStateDirs=[C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlintest])
> Task :common-scripting:compileTestJava NO-SOURCE
Skipping task ':common-scripting:compileTestJava' as it has no source files and no previous output files.
> Task :common-scripting:processTestResources
Task ':common-scripting:processTestResources' is not up-to-date because:
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildresourcestest has been removed.
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildresourcestestempty.txt has been removed.
> Task :common-scripting:testClasses
Skipping task ':common-scripting:testClasses' as it has no actions.
> Task :common-scripting:test
Task ':common-scripting:test' is not up-to-date because:
Output property 'binResultsDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildtest-resultstestbinary has been removed.
Output property 'binResultsDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildtest-resultstestbinaryoutput.bin has been removed.
Output property 'binResultsDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildtest-resultstestbinaryoutput.bin.idx has been removed.
Finished generating test XML results (0.0 secs) into: C:balagegitrlog_legacy_rlogcommon-scriptingbuildtest-resultstest
Generating HTML test report...
Finished generating test html results (0.009 secs) into: C:balagegitrlog_legacy_rlogcommon-scriptingbuildreportsteststest
BUILD SUCCESSFUL in 4s
12 actionable tasks: 6 executed, 6 up-to-date
It runs, even executes the test task, but none of the tests are executed. I checked the source directory configuration in IDEA, and the test path is included, so IDEA detects them.
What did go wrong?
When I try to execute tests from IDEA, it gives the following error:
> Task :common-scripting:test FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':common-scripting:test'.
> No tests found for given includes: [scripting.ValueTest](filter.includeTestsMatching)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
12 actionable tasks: 2 executed, 10 up-to-date
No tests found for given includes: [scripting.ValueTest](filter.includeTestsMatching)
17:09:04: Tasks execution finished ':common-scripting:cleanTest :common-scripting:test --tests "scripting.ValueTest"'.
gradle gradle-kotlin-dsl
add a comment |
I have a multi project setup, but would like to run a test in a subproject.
My file structure follows conventions:
+ common-scripting
+ src
+ main
+ kotlin
+ resources
+ test
+ kotlin
+ scripting
+ ValueTest.kt
+ resources
In my ValueTest.kt I have a dummy test case:
package scripting
import org.testng.Assert.assertTrue
import org.testng.annotations.Test
class ValueTest
@Test
fun testIt()
assertTrue(false)
My build script is this:
repositories
mavenCentral()
plugins
kotlin("jvm")
java
dependencies
compile(kotlin("stdlib-jdk8"))
compile(kotlin("script-runtime"))
compile(kotlin("script-util"))
compile(kotlin("compiler-embeddable"))
testImplementation("org.testng:testng:6.14.3")
However, when I run the tests:
> gradlew.bat --info :common-scripting:cleanTest :common-scripting:test
> Task :common-scripting:clean
Task ':common-scripting:clean' is not up-to-date because:
Task has not declared any outputs despite executing actions.
> Task :common-scripting:compileKotlin
Task ':common-scripting:compileKotlin' is not up-to-date because:
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlinmain has been removed.
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlinmainMETA-INF has been removed.
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlinmainMETA-INFcommon-scripting.kotlin_module has been removed.
All input files are considered out-of-date for incremental task ':common-scripting:compileKotlin'.
Using Kotlin incremental compilation
Options for KOTLIN DAEMON: IncrementalCompilationOptions(super=CompilationOptions(compilerMode=INCREMENTAL_COMPILER, targetPlatform=JVM, reportCategories=[0], reportSeverity=2, requestedCompi
lationResults=[0]), areFileChangesKnown=false, modifiedFiles=null, deletedFiles=null, workingDir=C:balagegitrlog_legacy_rlogcommon-scriptingbuildkotlincompileKotlin, customCacheVersio
nFileName='gradle-format-version.txt', customCacheVersion=4, multiModuleICSettings=MultiModuleICSettings(buildHistoryFile=C:balagegitrlog_legacy_rlogcommon-scriptingbuildkotlincompile
Kotlinbuild-history.bin, useModuleDetection=false), usePreciseJavaTracking=truelocalStateDirs=[C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlinmain])
> Task :common-scripting:compileJava NO-SOURCE
Skipping task ':common-scripting:compileJava' as it has no source files and no previous output files.
> Task :common-scripting:processResources
Task ':common-scripting:processResources' is not up-to-date because:
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildresourcesmain has been removed.
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildresourcesmainMETA-INF has been removed.
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildresourcesmainMETA-INFservices has been removed.
> Task :common-scripting:classes
Skipping task ':common-scripting:classes' as it has no actions.
> Task :common-scripting:compileTestKotlin
Task ':common-scripting:compileTestKotlin' is not up-to-date because:
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlintest has been removed.
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlintestMETA-INF has been removed.
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlintestMETA-INFcommon-scripting.kotlin_module has been removed.
All input files are considered out-of-date for incremental task ':common-scripting:compileTestKotlin'.
Using Kotlin incremental compilation
Options for KOTLIN DAEMON: IncrementalCompilationOptions(super=CompilationOptions(compilerMode=INCREMENTAL_COMPILER, targetPlatform=JVM, reportCategories=[0], reportSeverity=2, requestedCompi
lationResults=[0]), areFileChangesKnown=false, modifiedFiles=null, deletedFiles=null, workingDir=C:balagegitrlog_legacy_rlogcommon-scriptingbuildkotlincompileTestKotlin, customCacheVe
rsionFileName='gradle-format-version.txt', customCacheVersion=4, multiModuleICSettings=MultiModuleICSettings(buildHistoryFile=C:balagegitrlog_legacy_rlogcommon-scriptingbuildkotlincom
pileTestKotlinbuild-history.bin, useModuleDetection=false), usePreciseJavaTracking=truelocalStateDirs=[C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlintest])
> Task :common-scripting:compileTestJava NO-SOURCE
Skipping task ':common-scripting:compileTestJava' as it has no source files and no previous output files.
> Task :common-scripting:processTestResources
Task ':common-scripting:processTestResources' is not up-to-date because:
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildresourcestest has been removed.
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildresourcestestempty.txt has been removed.
> Task :common-scripting:testClasses
Skipping task ':common-scripting:testClasses' as it has no actions.
> Task :common-scripting:test
Task ':common-scripting:test' is not up-to-date because:
Output property 'binResultsDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildtest-resultstestbinary has been removed.
Output property 'binResultsDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildtest-resultstestbinaryoutput.bin has been removed.
Output property 'binResultsDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildtest-resultstestbinaryoutput.bin.idx has been removed.
Finished generating test XML results (0.0 secs) into: C:balagegitrlog_legacy_rlogcommon-scriptingbuildtest-resultstest
Generating HTML test report...
Finished generating test html results (0.009 secs) into: C:balagegitrlog_legacy_rlogcommon-scriptingbuildreportsteststest
BUILD SUCCESSFUL in 4s
12 actionable tasks: 6 executed, 6 up-to-date
It runs, even executes the test task, but none of the tests are executed. I checked the source directory configuration in IDEA, and the test path is included, so IDEA detects them.
What did go wrong?
When I try to execute tests from IDEA, it gives the following error:
> Task :common-scripting:test FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':common-scripting:test'.
> No tests found for given includes: [scripting.ValueTest](filter.includeTestsMatching)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
12 actionable tasks: 2 executed, 10 up-to-date
No tests found for given includes: [scripting.ValueTest](filter.includeTestsMatching)
17:09:04: Tasks execution finished ':common-scripting:cleanTest :common-scripting:test --tests "scripting.ValueTest"'.
gradle gradle-kotlin-dsl
I have a multi project setup, but would like to run a test in a subproject.
My file structure follows conventions:
+ common-scripting
+ src
+ main
+ kotlin
+ resources
+ test
+ kotlin
+ scripting
+ ValueTest.kt
+ resources
In my ValueTest.kt I have a dummy test case:
package scripting
import org.testng.Assert.assertTrue
import org.testng.annotations.Test
class ValueTest
@Test
fun testIt()
assertTrue(false)
My build script is this:
repositories
mavenCentral()
plugins
kotlin("jvm")
java
dependencies
compile(kotlin("stdlib-jdk8"))
compile(kotlin("script-runtime"))
compile(kotlin("script-util"))
compile(kotlin("compiler-embeddable"))
testImplementation("org.testng:testng:6.14.3")
However, when I run the tests:
> gradlew.bat --info :common-scripting:cleanTest :common-scripting:test
> Task :common-scripting:clean
Task ':common-scripting:clean' is not up-to-date because:
Task has not declared any outputs despite executing actions.
> Task :common-scripting:compileKotlin
Task ':common-scripting:compileKotlin' is not up-to-date because:
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlinmain has been removed.
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlinmainMETA-INF has been removed.
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlinmainMETA-INFcommon-scripting.kotlin_module has been removed.
All input files are considered out-of-date for incremental task ':common-scripting:compileKotlin'.
Using Kotlin incremental compilation
Options for KOTLIN DAEMON: IncrementalCompilationOptions(super=CompilationOptions(compilerMode=INCREMENTAL_COMPILER, targetPlatform=JVM, reportCategories=[0], reportSeverity=2, requestedCompi
lationResults=[0]), areFileChangesKnown=false, modifiedFiles=null, deletedFiles=null, workingDir=C:balagegitrlog_legacy_rlogcommon-scriptingbuildkotlincompileKotlin, customCacheVersio
nFileName='gradle-format-version.txt', customCacheVersion=4, multiModuleICSettings=MultiModuleICSettings(buildHistoryFile=C:balagegitrlog_legacy_rlogcommon-scriptingbuildkotlincompile
Kotlinbuild-history.bin, useModuleDetection=false), usePreciseJavaTracking=truelocalStateDirs=[C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlinmain])
> Task :common-scripting:compileJava NO-SOURCE
Skipping task ':common-scripting:compileJava' as it has no source files and no previous output files.
> Task :common-scripting:processResources
Task ':common-scripting:processResources' is not up-to-date because:
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildresourcesmain has been removed.
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildresourcesmainMETA-INF has been removed.
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildresourcesmainMETA-INFservices has been removed.
> Task :common-scripting:classes
Skipping task ':common-scripting:classes' as it has no actions.
> Task :common-scripting:compileTestKotlin
Task ':common-scripting:compileTestKotlin' is not up-to-date because:
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlintest has been removed.
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlintestMETA-INF has been removed.
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlintestMETA-INFcommon-scripting.kotlin_module has been removed.
All input files are considered out-of-date for incremental task ':common-scripting:compileTestKotlin'.
Using Kotlin incremental compilation
Options for KOTLIN DAEMON: IncrementalCompilationOptions(super=CompilationOptions(compilerMode=INCREMENTAL_COMPILER, targetPlatform=JVM, reportCategories=[0], reportSeverity=2, requestedCompi
lationResults=[0]), areFileChangesKnown=false, modifiedFiles=null, deletedFiles=null, workingDir=C:balagegitrlog_legacy_rlogcommon-scriptingbuildkotlincompileTestKotlin, customCacheVe
rsionFileName='gradle-format-version.txt', customCacheVersion=4, multiModuleICSettings=MultiModuleICSettings(buildHistoryFile=C:balagegitrlog_legacy_rlogcommon-scriptingbuildkotlincom
pileTestKotlinbuild-history.bin, useModuleDetection=false), usePreciseJavaTracking=truelocalStateDirs=[C:balagegitrlog_legacy_rlogcommon-scriptingbuildclasseskotlintest])
> Task :common-scripting:compileTestJava NO-SOURCE
Skipping task ':common-scripting:compileTestJava' as it has no source files and no previous output files.
> Task :common-scripting:processTestResources
Task ':common-scripting:processTestResources' is not up-to-date because:
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildresourcestest has been removed.
Output property 'destinationDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildresourcestestempty.txt has been removed.
> Task :common-scripting:testClasses
Skipping task ':common-scripting:testClasses' as it has no actions.
> Task :common-scripting:test
Task ':common-scripting:test' is not up-to-date because:
Output property 'binResultsDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildtest-resultstestbinary has been removed.
Output property 'binResultsDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildtest-resultstestbinaryoutput.bin has been removed.
Output property 'binResultsDir' file C:balagegitrlog_legacy_rlogcommon-scriptingbuildtest-resultstestbinaryoutput.bin.idx has been removed.
Finished generating test XML results (0.0 secs) into: C:balagegitrlog_legacy_rlogcommon-scriptingbuildtest-resultstest
Generating HTML test report...
Finished generating test html results (0.009 secs) into: C:balagegitrlog_legacy_rlogcommon-scriptingbuildreportsteststest
BUILD SUCCESSFUL in 4s
12 actionable tasks: 6 executed, 6 up-to-date
It runs, even executes the test task, but none of the tests are executed. I checked the source directory configuration in IDEA, and the test path is included, so IDEA detects them.
What did go wrong?
When I try to execute tests from IDEA, it gives the following error:
> Task :common-scripting:test FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':common-scripting:test'.
> No tests found for given includes: [scripting.ValueTest](filter.includeTestsMatching)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
12 actionable tasks: 2 executed, 10 up-to-date
No tests found for given includes: [scripting.ValueTest](filter.includeTestsMatching)
17:09:04: Tasks execution finished ':common-scripting:cleanTest :common-scripting:test --tests "scripting.ValueTest"'.
gradle gradle-kotlin-dsl
gradle gradle-kotlin-dsl
asked Nov 15 '18 at 16:13
Balage1551Balage1551
360417
360417
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You haven't told the test task to use TestNG:
tasks.getByName<Test>("test")
useTestNG()
Some clarification: if you would like to put it into the root project, and not all subprojects has tests, use tasks.withType<Test> useTestNG() , to avoid "No such task" error!
– Balage1551
Nov 15 '18 at 23:26
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53323569%2fgradle-kotlin-dsl-tests-not-executed%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You haven't told the test task to use TestNG:
tasks.getByName<Test>("test")
useTestNG()
Some clarification: if you would like to put it into the root project, and not all subprojects has tests, use tasks.withType<Test> useTestNG() , to avoid "No such task" error!
– Balage1551
Nov 15 '18 at 23:26
add a comment |
You haven't told the test task to use TestNG:
tasks.getByName<Test>("test")
useTestNG()
Some clarification: if you would like to put it into the root project, and not all subprojects has tests, use tasks.withType<Test> useTestNG() , to avoid "No such task" error!
– Balage1551
Nov 15 '18 at 23:26
add a comment |
You haven't told the test task to use TestNG:
tasks.getByName<Test>("test")
useTestNG()
You haven't told the test task to use TestNG:
tasks.getByName<Test>("test")
useTestNG()
answered Nov 15 '18 at 16:30
JB NizetJB Nizet
545k588901017
545k588901017
Some clarification: if you would like to put it into the root project, and not all subprojects has tests, use tasks.withType<Test> useTestNG() , to avoid "No such task" error!
– Balage1551
Nov 15 '18 at 23:26
add a comment |
Some clarification: if you would like to put it into the root project, and not all subprojects has tests, use tasks.withType<Test> useTestNG() , to avoid "No such task" error!
– Balage1551
Nov 15 '18 at 23:26
Some clarification: if you would like to put it into the root project, and not all subprojects has tests, use tasks.withType<Test> useTestNG() , to avoid "No such task" error!
– Balage1551
Nov 15 '18 at 23:26
Some clarification: if you would like to put it into the root project, and not all subprojects has tests, use tasks.withType<Test> useTestNG() , to avoid "No such task" error!
– Balage1551
Nov 15 '18 at 23:26
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53323569%2fgradle-kotlin-dsl-tests-not-executed%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown