简体   繁体   中英

mvn clean install is SUCCESS for my spring-cloud-contract consumer tests, but when I run the tests manually they are FAILING?

I have the spring-cloud-contract tests projects in place where I am doing a consumer-driven contract testing. Instead of going through the code, I just have technical question. I have written my consumer test cases in a separate consumer side application which will talk to the producer stub jar. Everything goes fine, as the test pass if nothing changes in contract and fails when something in contract changes and not updated properly.

But when they fail, when I run the consumer side test cases, they fail manually when I run the test cases as Run as Tests in IDE . If I do mvn clean install builds are passing ? how is this possible ? How will I know if the tests failed ? do i have to run them manually everytime and see ? How will I know if the consumer side tests are failing if I add this code as pipeline build ?

mvn clean install is passing even if tests are failing manually when I run them ?

I am not using skipTests flag

thanks for everyone's suggestion, I have found fix for this. I have not added the naming convention Test for my test classes under src/main/test , which was causing this issue. Fixed it. Thanks for your help

'mvn clean install' will try to find test-cases in 'src/test/java' only. Please check once if your test-classes reside at this location.

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