[英]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
. 但是当它们失败时,当我运行用户端测试用例时,当我以
IDE
Run as Tests
运行测试用例时,它们会手动失败。 If I do mvn clean install
builds are passing ? 如果我执行
mvn clean install
版本会通过? 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 ? 即使我在运行测试时手动失败,
mvn clean install
也会通过?
I am not using skipTests
flag 我没有使用
skipTests
标志
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. 我尚未在
src/main/test
下为我的测试类添加命名约定Test
,这导致了此问题。 Fixed it. 修复。 Thanks for your help
谢谢你的帮助
'mvn clean install' will try to find test-cases in 'src/test/java' only. “ mvn clean install”将尝试仅在“ src / test / java”中查找测试用例。 Please check once if your test-classes reside at this location.
请检查一次您的考试班是否位于此位置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.