Interface JvmTestSuite

    • Method Detail

      • getSources

        SourceSet getSources()
        Returns the container of JvmTestSuiteTarget 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.
        Returns:
        source set for this test suite.
      • sources

        void sources​(Action<? super SourceSet> configuration)
        Configure the sources for this test suite.
        Parameters:
        configuration - configuration applied against the SourceSet for this test suite
      • getTestType

        Property<java.lang.String> getTestType()
        Get the test type for this test suite. Defaults to the value of the UNIT_TEST constant defined in TestSuiteType for the built-in test suite, and to the dash-case name of the test suite for custom test suites. Test suite types must be unique across all test suites within a project.
        Since:
        7.4
      • useJUnitJupiter

        void useJUnitJupiter()
        Use the JUnit Jupiter testing framework.

        Gradle will provide the version of JUnit Jupiter to use. Defaults to version 5.8.2

      • useJUnitJupiter

        void useJUnitJupiter​(java.lang.String version)
        Use the JUnit Jupiter testing framework with a specific version.
        Parameters:
        version - version of JUnit Jupiter to use
      • useJUnitJupiter

        void useJUnitJupiter​(Provider<java.lang.String> version)
        Use the JUnit Jupiter testing framework with a specific version.
        Parameters:
        version - provider supplying the version of JUnit Jupiter to use
        Since:
        7.6
      • useJUnit

        void useJUnit()
        Use the JUnit4 testing framework.

        Gradle will provide the version of JUnit4 to use. Defaults to version 4.13.2

      • useJUnit

        void useJUnit​(java.lang.String version)
        Use the JUnit4 testing framework with a specific version.
        Parameters:
        version - version of JUnit4 to use
      • useJUnit

        void useJUnit​(Provider<java.lang.String> version)
        Use the JUnit4 testing framework with a specific version.
        Parameters:
        version - provider supplying the version of JUnit4 to use
        Since:
        7.6
      • useSpock

        void useSpock()
        Use the Spock Framework testing framework.

        Gradle will provide the version of Spock to use. Defaults to version 2.2-groovy-3.0

      • useSpock

        void useSpock​(java.lang.String version)
        Use the Spock Framework testing framework with a specific version.
        Parameters:
        version - the version of Spock to use
      • useSpock

        void useSpock​(Provider<java.lang.String> version)
        Use the Spock Framework testing framework with a specific version.
        Parameters:
        version - provider supplying the version of Spock to use
        Since:
        7.6
      • useKotlinTest

        void useKotlinTest()
        Use the kotlin.test testing framework.

        Gradle will provide the version of kotlin.test to use. Defaults to version 1.6.20

      • useKotlinTest

        void useKotlinTest​(java.lang.String version)
        Use the kotlin.test testing framework with a specific version.
        Parameters:
        version - the version of kotlin.test to use
      • useKotlinTest

        void useKotlinTest​(Provider<java.lang.String> version)
        Use the kotlin.test testing framework with a specific version.
        Parameters:
        version - provider supplying the version of kotlin.test to use
        Since:
        7.6
      • useTestNG

        void useTestNG()
        Use the TestNG testing framework.

        Gradle will provide the version of TestNG to use. Defaults to version 7.4.0

      • useTestNG

        void useTestNG​(java.lang.String version)
        Use the TestNG testing framework with a specific version.
        Parameters:
        version - version of TestNG to use
      • useTestNG

        void useTestNG​(Provider<java.lang.String> version)
        Use the TestNG testing framework with a specific version.
        Parameters:
        version - provider supplying the version of TestNG to use
        Since:
        7.6
      • getDependencies

        JvmComponentDependencies getDependencies()
        Dependency handler for this component.
        Returns:
        dependency handler