Skip to content

Commit

Permalink
[Gradle] Add KDoc for KotlinTestRun
Browse files Browse the repository at this point in the history
^KT-58858 In Progress
  • Loading branch information
Tapchicoma authored and qodana-bot committed Nov 14, 2024
1 parent d10e47a commit 54452c0
Showing 1 changed file with 26 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,58 @@ import org.gradle.api.file.FileCollection
import org.gradle.api.tasks.testing.TestFilter

/**
* @suppress TODO: KT-58858 add documentation
* A [KotlinExecution] that runs configured tests.
*/
interface KotlinTestRun<out SourceType : KotlinExecution.ExecutionSource> : KotlinExecution<SourceType> {

/**
* Configures filtering for executable tests using the provided [configureFilter] configuration.
*/
fun filter(configureFilter: TestFilter.() -> Unit)

/**
* Configures filtering for executable tests using the provided [configureFilter] configuration.
*/
fun filter(configureFilter: Closure<*>)
}

/**
* @suppress TODO: KT-58858 add documentation
* A [KotlinTargetExecution] that executes configured tests in the context of a specific [KotlinTarget].
*/
interface KotlinTargetTestRun<ExecutionSource : KotlinExecution.ExecutionSource> :
KotlinTestRun<ExecutionSource>,
KotlinTargetExecution<ExecutionSource>

/**
* @suppress TODO: KT-58858 add documentation
* A [KotlinExecution.ExecutionSource] that provides the [classpath] and [testClassesDirs] where JVM test classes can be found.
*/
interface JvmClasspathTestRunSource : KotlinExecution.ExecutionSource {

/**
* The part of the classpath where JVM test classes are located for execution.
*/
val testClassesDirs: FileCollection

/**
* The tests classpath.
*
* This includes dependencies and/or test framework classes such as JUnit, TestNG, or any other test framework classes.
*/
val classpath: FileCollection
}

/**
* @suppress TODO: KT-58858 add documentation
* Configures the [JvmClasspathTestRunSource].
*/
interface ClasspathTestRunSourceSupport {

/**
* Select the exact [classpath] to run the tests from.
* Configures values for the [JvmClasspathTestRunSource].
*
* Only the classes from [testClasses] will be treated as tests.
* Calling this method overwrites any already configured values in the [JvmClasspathTestRunSource].
*
* This overrides other [KotlinExecution.executionSource] selection options.
* @param [classpath] Tests classpath
* @param [testClassesDirs] Only the classes from this [FileCollection] are treated as tests.
*/
fun setExecutionSourceFrom(classpath: FileCollection, testClassesDirs: FileCollection)
}

0 comments on commit 54452c0

Please sign in to comment.