compileTestJava
compileTestJava is a task commonly found in build automation tools, particularly within the Gradle ecosystem. Its primary purpose is to compile the Java source code designated for testing purposes. This task is distinct from compiling the main application code.
When you execute compileTestJava, the build tool identifies all Java files located in the standard test source
The compilation process for test code ensures that the tests themselves are syntactically correct and can