failsGracefullyWhenNoTestMainMethodIsFound() — spring-boot Function Reference
Architecture documentation for the failsGracefullyWhenNoTestMainMethodIsFound() function in BootTestRunIntegrationTests.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD ee554c17_a6e0_f406_875b_0fbddb22b9cb["failsGracefullyWhenNoTestMainMethodIsFound()"] 57b33ade_6439_5443_d7bd_6cee52ee1d4c["copyApplication()"] ee554c17_a6e0_f406_875b_0fbddb22b9cb -->|calls| 57b33ade_6439_5443_d7bd_6cee52ee1d4c c7986895_3e4f_9f68_d64c_8b6c984d0f0d["canonicalPathOf()"] ee554c17_a6e0_f406_875b_0fbddb22b9cb -->|calls| c7986895_3e4f_9f68_d64c_8b6c984d0f0d style ee554c17_a6e0_f406_875b_0fbddb22b9cb fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
build-plugin/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/run/BootTestRunIntegrationTests.java lines 116–132
@TestTemplate
void failsGracefullyWhenNoTestMainMethodIsFound() throws IOException {
copyApplication("nomain");
BuildResult result = this.gradleBuild.buildAndFail("bootTestRun");
BuildTask task = result.task(":bootTestRun");
assertThat(task).isNotNull();
assertThat(task.getOutcome()).isEqualTo(TaskOutcome.FAILED);
if (this.gradleBuild.isConfigurationCache() && this.gradleBuild.gradleVersionIsAtLeast("8.0")) {
assertThat(result.getOutput())
.contains("Main class name has not been configured and it could not be resolved from classpath");
}
else {
assertThat(result.getOutput())
.contains("Main class name has not been configured and it could not be resolved from classpath "
+ canonicalPathOf("build/classes/java/test"));
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does failsGracefullyWhenNoTestMainMethodIsFound() do?
failsGracefullyWhenNoTestMainMethodIsFound() is a function in the spring-boot codebase.
What does failsGracefullyWhenNoTestMainMethodIsFound() call?
failsGracefullyWhenNoTestMainMethodIsFound() calls 2 function(s): canonicalPathOf, copyApplication.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free