Movatterモバイル変換


[0]ホーム

URL:


JvmTestSuite

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

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

Properties

PropertyDescription
buildDependencies

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.

dependencies
Incubating

Dependency handler for this component.

sources
Incubating

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.

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 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.

Methods

MethodDescription
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.

Script blocks

No script blocks

Property details

TaskDependencybuildDependencies (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.

JvmComponentDependenciesdependencies (read-only)

Note: This property isincubating and may change in a future version of Gradle.

Dependency handler for this component.

SourceSetsources (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.

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.

Property<String>testType

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.

Method details

voiduseJUnit()

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

voiduseJUnit(String version)

Note: This method isincubating and may change in a future version of Gradle.

Use theJUnit4 testing framework with a specific version.

voiduseJUnit(Provider<String> version)

Note: This method isincubating and may change in a future version of Gradle.

Use theJUnit4 testing framework with a specific version.

voiduseJUnitJupiter()

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

voiduseJUnitJupiter(String version)

Note: This method isincubating and may change in a future version of Gradle.

Use theJUnit Jupiter testing framework with a specific version.

voiduseJUnitJupiter(Provider<String> version)

Note: This method isincubating and may change in a future version of Gradle.

Use theJUnit Jupiter testing framework with a specific version.

voiduseSpock()

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

voiduseSpock(String version)

Note: This method isincubating and may change in a future version of Gradle.

Use theSpock Framework testing framework with a specific version.

voiduseSpock(Provider<String> version)

Note: This method isincubating and may change in a future version of Gradle.

Use theSpock Framework testing framework with a specific version.

voiduseTestNG()

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

voiduseTestNG(String version)

Note: This method isincubating and may change in a future version of Gradle.

Use theTestNG testing framework with a specific version.

voiduseTestNG(Provider<String> version)

Note: This method isincubating and may change in a future version of Gradle.

Use theTestNG testing framework with a specific version.

©Gradle Inc. All rights reserved.
gradle
Careers |Privacy |Terms of Service |Contact

[8]ページ先頭

©2009-2025 Movatter.jp