Find sources that are likely tests
org.openrewrite.java.search.IsLikelyTest Sources that contain indicators of being, or being exclusively for the use in tests. This recipe is not exhaustive, but is intended to be a good starting point for finding test sources. Looks at the source set name, and types in use; for example looks for uses of JUnit & TestNG annotations/assertions.
- groupId: org.openrewrite
- artifactId: rewrite-java
- version: 7.38.0
This recipe has no required configuration parameters and comes from a rewrite core library. It can be activated directly without adding any dependencies.
Maven Command Line
mvn -U org.openrewrite.maven:rewrite-maven-plugin:run \
The Moderne public SaaS instance enables you to easily run recipes across thousands of open-source repositories.
Please contact Moderne for more information about safely running the recipes on your own codebase in a private SaaS.