Table of Contents
API Documentation: | JvmTestSuite |
---|
Note: This class isincubating and may change in a future version of Gradle.
A test suite is a collection of JVM-based tests.
Each test suite consists of
- A
SourceSet
- A set of
JvmComponentDependencies
- One or more
JvmTestSuiteTarget
- A testing framework
Based on the testing framework declared, Gradle will automatically add the appropriate dependencies and configure the underlying test task.
Property | Description |
buildDependencies | Returns a dependency which contains the tasks which build this artifact. All |
dependencies | Incubating Dependency handler for this component. |
sources | Incubating The container of |
targets | Incubating Collection of test suite targets.Each test suite target executes the tests in this test suite with a particular context and task. |
testType | Incubating Get the test type for this test suite.Defaults to the value of the |
Method | Description |
useJUnit() | Incubating Use theJUnit4 testing framework. |
useJUnit(version) | Incubating Use theJUnit4 testing framework with a specific version. |
useJUnit(version) | Incubating Use theJUnit4 testing framework with a specific version. |
useJUnitJupiter() | Incubating Use theJUnit Jupiter testing framework. |
useJUnitJupiter(version) | Incubating Use theJUnit Jupiter testing framework with a specific version. |
useJUnitJupiter(version) | Incubating Use theJUnit Jupiter testing framework with a specific version. |
useSpock() | Incubating Use theSpock Framework testing framework. |
useSpock(version) | Incubating Use theSpock Framework testing framework with a specific version. |
useSpock(version) | Incubating Use theSpock Framework testing framework with a specific version. |
useTestNG() | Incubating Use theTestNG testing framework. |
useTestNG(version) | Incubating Use theTestNG testing framework with a specific version. |
useTestNG(version) | Incubating Use theTestNG testing framework with a specific version. |
TaskDependency
buildDependencies
(read-only)
Returns a dependency which contains the tasks which build this artifact. AllBuildable
implementationsmust ensure that the returned dependency object is live, so that it tracks changes to the dependencies of thisbuildable.
JvmComponentDependencies
dependencies
(read-only)
Note: This property isincubating and may change in a future version of Gradle.
Dependency handler for this component.
SourceSet
sources
(read-only)
Note: This property isincubating and may change in a future version of Gradle.
The container ofJvmTestSuiteTarget
objects part of this suite.Source set associated with this test suite. The name of this source set is the same as the test suite.
ExtensiblePolymorphicDomainObjectContainer
<? extendsJvmTestSuiteTarget
>
targets
(read-only)
ExtensiblePolymorphicDomainObjectContainer
<? extendsJvmTestSuiteTarget
>Note: This property isincubating and may change in a future version of Gradle.
Collection of test suite targets.Each test suite target executes the tests in this test suite with a particular context and task.
Note: This property isincubating and may change in a future version of Gradle.
Get the test type for this test suite.Defaults to the value of theUNIT_TEST
constant defined inTestSuiteType
for the built-in test suite, and to the dash-case name of thetest suite for custom test suites. Test suite types must be unique across all test suites within a project.
Note: This method isincubating and may change in a future version of Gradle.
Use theJUnit4 testing framework.
Gradle will provide the version of JUnit4 to use. Defaults to version4.13.2
void
useJUnit
(String
version)
Note: This method isincubating and may change in a future version of Gradle.
Use theJUnit4 testing framework with a specific version.
Note: This method isincubating and may change in a future version of Gradle.
Use theJUnit4 testing framework with a specific version.
Note: This method isincubating and may change in a future version of Gradle.
Use theJUnit Jupiter testing framework.
Gradle will provide the version of JUnit Jupiter to use. Defaults to version5.8.2
void
useJUnitJupiter
(String
version)
Note: This method isincubating and may change in a future version of Gradle.
Use theJUnit Jupiter testing framework with a specific version.
Note: This method isincubating and may change in a future version of Gradle.
Use theJUnit Jupiter testing framework with a specific version.
Note: This method isincubating and may change in a future version of Gradle.
Use theSpock Framework testing framework.
Gradle will provide the version of Spock to use. Defaults to version2.2-groovy-3.0
void
useSpock
(String
version)
Note: This method isincubating and may change in a future version of Gradle.
Use theSpock Framework testing framework with a specific version.
Note: This method isincubating and may change in a future version of Gradle.
Use theSpock Framework testing framework with a specific version.
Note: This method isincubating and may change in a future version of Gradle.
Use theTestNG testing framework.
Gradle will provide the version of TestNG to use. Defaults to version7.4.0
void
useTestNG
(String
version)
Note: This method isincubating and may change in a future version of Gradle.
Use theTestNG testing framework with a specific version.
Note: This method isincubating and may change in a future version of Gradle.
Use theTestNG testing framework with a specific version.