How to share test code infra between test suites?

Hi Team, I have added “integrationTest” suite in my project using “JVM Test Suite” plugin. So now i have “test” and “integrationTest” test suites. How can I share test infrastructure code among these two in my codebase ?

In other words, we just want to write some common test classes and some other codes that we then want to use in both the places: “test” as well as “smokeTest” test classes.
How can we achieve it, without writing same classes in both locations ?

This sounds like you would benefit from using the java-test-fixtures plugin to handle your common test code. You can read more about this feature in the Java Testing section of the User Guide.

1 Like