简体   繁体   中英

Spock test being Ignored when Spring context cannot start

I have problem with Spring Spock integration. I have SpringBoot test in Spock which set up Application Context. If for some reason Spring context is broken (for example missing Autowired dependency) then all Spock tests in the test class are being Ignored and the build is successful. Is there any solution to fail build or do not Ignore Spock tests if Application context has failed?

I have figured it out. It turned out that above behavior is due to bug in maven-surefire-plugin v.3.0.0-M4. In version 3.0.0-M7 the build is failing as expected.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM