playframework / play1

Play framework
https://www.playframework.com/documentation/1.4.x/home
Other
1.58k stars 682 forks source link

"play auto-test" can return a exit code zero when the tests don't run #1437

Closed tstedman closed 1 year ago

tstedman commented 1 year ago

"play auto-test" can return an exit code of zero when the tests do not run due to the application failing to start. This can occur as a result of an unhandled exception when initializing a module or a compiler error within the application.

The impact is that a configuration error can cause "ant test" to report BUILD SUCCESS, even when the tests do not run. This can be seen when running manually, and is also observed when run within the context of Jenkins or other automated build tools. With respect to Jenkins, this leads Jenkins to report that everything is fine (i.e. sunny) even where the underlying project tests did not successfully run.

Two commons ways to reproduce the problem: 1) Add a syntax error to one of the app's java files. 2) Configure an application to use a database that doesn't exist.

ihostage commented 1 year ago

@mkurz would you transfer this issue to Play1 repo, please 😉

xael-fry commented 1 year ago

Merged in master with #1435