The test class and its method are package-private which means that no tests are run. They cannot be made public until https://github.com/spring-io/spring-javaformat/issues/152 is fixed or we configure a Checkstyle suppression.

Comment From: davebarda

I have tried to add public to both class and method and running the check task, but everything worked. This is the method: smoketest.testng.SampleTestNGApplicationTests#testHome Can you give some further explanation so I can verify that my solutions works? Thanks.

Comment From: wilkinsona

There's not much more to explain. With the class and method made public, here's the output when building the module:

./mvnw -f spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-testng verify
[INFO] Scanning for projects...
[INFO] 
[INFO] -------< org.springframework.boot:spring-boot-smoke-test-testng >-------
[INFO] Building Spring Boot TestNG Smoke Test 2.2.3.BUILD-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-checkstyle-plugin:3.0.0:check (checkstyle-validation) @ spring-boot-smoke-test-testng ---
[INFO] There is 1 error reported by Checkstyle 8.22 with src/checkstyle/checkstyle.xml ruleset.
[ERROR] src/test/java/smoketest/testng/SampleTestNGApplicationTests.java:[42,9] (extension) SpringJUnit5: Test method 'testHome' should not be public.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.471 s
[INFO] Finished at: 2019-12-14T20:23:41Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.0.0:check (checkstyle-validation) on project spring-boot-smoke-test-testng: You have 1 Checkstyle violation. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Comment From: mbhave

I think we can close this since testHome is now public with a checkstyle suppression.