# getSource

@Incubating
abstract fun getSource(): TestSource(source)

Returns information about the source of the test.

The known source types are modeled as TestSource subtypes.

If the test execution explicitly declares that no test source information is available then the method returns NoSource. If Gradle fails to determine the test source information, the method returns OtherSource.

For older Gradle versions, the implementation will attempt to provide a valid result based on the state of the source object using NoSource as a default value.

#### Return

the test source

#### Since

9.4.0