NOTE: You can open this sample inside an IDE using the https://www.jetbrains.com/help/idea/gradle.html#gradle_import_project_start[IntelliJ native importer] or https://projects.eclipse.org/projects/tools.buildship[Eclipse Buildship].

This sample shows how to add additional test types to a JVM project in Gradle. Your project may have many different kinds of tests--unit tests, integration tests, functional tests, etc. A JVM project in Gradle has a single `Test` task, but other tasks can be added to represent each of these test types using the link:{userManualPath}/jvm_test_suite_plugin.html[Test Suite Plugin].

NOTE: This sample shows how to adopt an link:sample_jvm_multi_project_with_additional_test_types.html[existing sample] for use with Test Suites.

IMPORTANT: Test Suites are an link:{userManualPath}/feature_lifecycle.html#sec:incubating_state[incubating] feature, and the details described here may change.

In this sample, we are testing Java projects with JUnit5; however, this applies to other JVM languages as well.

Concretely, we add a _convention plugin_ in `buildSrc` to share the integration test setup between multiple subprojects:

====
include::sample[dir="groovy",files="buildSrc/src/main/groovy/myproject.java-conventions.gradle[]"]
include::sample[dir="kotlin",files="buildSrc/src/main/kotlin/myproject.java-conventions.gradle.kts[]"]
====

And apply it in an application project:

====
include::sample[dir="groovy",files="application/build.gradle[]"]
include::sample[dir="kotlin",files="application/build.gradle.kts[]"]
====

And in library projects:

====
include::sample[dir="groovy",files="utilities/build.gradle[]"]
include::sample[dir="kotlin",files="utilities/build.gradle.kts[]"]
====

These additional tests can be executed with the `integrationTest` task or as part of lifecycle `check`:

[listing.terminal.sample-command]
----
$ ./gradlew check

BUILD SUCCESSFUL
14 actionable tasks: 14 executed
----

For more information, see link:{userManualPath}/java_testing.html#sec:configuring_java_integration_tests[section Configuring integration tests in the Testing in Java project chapter].
