# JvmTestSuite

@Incubating
interface JvmTestSuite : TestSuite, Buildable(source)

A test suite is a collection of JVM-based tests.

Each test suite consists of

- A SourceSet
- A set of compile and runtime dependencies
- One or more targets
- A testing framework

Based on the testing framework declared, Gradle will automatically add the appropriate dependencies and configure the underlying test task.

The default test suite (named DEFAULT_TEST_SUITE_NAME) will default to using the JUnit 4 test framework for backwards compatibility. Any other test suite will default to using the JUnit Jupiter test framework.

#### Since

7.3

## Functions

dependencies
Link copied to clipboard
abstract fun dependencies(dependencies: Action<in JvmComponentDependencies>)
Configure dependencies for this component.
getBuildDependencies
Link copied to clipboard
abstract fun getBuildDependencies(): TaskDependency
Returns a dependency which contains the tasks which build this artifact.
getDependencies
Link copied to clipboard
abstract fun getDependencies(): JvmComponentDependencies
Dependency handler for this component.
getName
Link copied to clipboard
abstract fun getName(): String
The object's name.
getSources
Link copied to clipboard
abstract fun getSources(): SourceSet
Returns the container of JvmTestSuiteTarget objects part of this suite.
getTargets
Link copied to clipboard
abstract fun getTargets(): ExtensiblePolymorphicDomainObjectContainer<out JvmTestSuiteTarget>
Collection of test suite targets.
sources
Link copied to clipboard
abstract fun sources(configuration: Action<in SourceSet>)
Configure the sources for this test suite.
useJUnit
Link copied to clipboard
abstract fun useJUnit()
Use the JUnit4 testing framework.
abstract fun useJUnit(version: String)
abstract fun useJUnit(version: Provider<String>)
Use the JUnit4 testing framework with a specific version.
useJUnitJupiter
Link copied to clipboard
abstract fun useJUnitJupiter()
Use the JUnit Jupiter testing framework.
abstract fun useJUnitJupiter(version: String)
abstract fun useJUnitJupiter(version: Provider<String>)
Use the JUnit Jupiter testing framework with a specific version.
useKotlinTest
Link copied to clipboard
abstract fun useKotlinTest()
Use the kotlin.test testing framework.
abstract fun useKotlinTest(version: String)
abstract fun useKotlinTest(version: Provider<String>)
Use the kotlin.test testing framework with a specific version.
useSpock
Link copied to clipboard
abstract fun useSpock()
Use the Spock Framework testing framework.
abstract fun useSpock(version: String)
abstract fun useSpock(version: Provider<String>)
Use the Spock Framework testing framework with a specific version.
useTestNG
Link copied to clipboard
abstract fun useTestNG()
Use the TestNG testing framework.
abstract fun useTestNG(version: String)
abstract fun useTestNG(version: Provider<String>)
Use the TestNG testing framework with a specific version.