你想要用mvn运行ITCase时,我可以做什么?

huangapple go评论68阅读模式
英文:

What can I do when I want to run run ITCase with mvn?

问题

当我们运行utcase时,可以使用 mvn test -Dtest=AA,但如果我们想运行ITCase,我们可以怎么做?

我使用 mvn test -Dtest=AAITCase,但这个用例不会运行。

所以当我想运行ITCase时,我们可以怎么做?

  • mvn版本:3.2.5
  • Java版本:JDK 8
英文:

When we run utcase, we can use mvn test -Dtest=AA, but if we want to run ITCase, what can we do?

I use mvn test -Dtest=AAITCase, but this case will not run.

So when I want to run ITCase, what can we do?

  • mvn version: 3.2.5
  • Java version: JDK 8

答案1

得分: 0

集成测试将在verify阶段执行,而不是在test阶段(请参阅maven生命周期):

> verify - 对集成测试的结果运行任何检查,以确保满足质量标准

因此,您需要执行以下命令:

mvn verify -Dtest=AAITCase
英文:

Integration tests will be executed in the verifyphase, not in the `test phase (see the maven lifecycle):

>verify - run any checks on results of integration tests to ensure quality criteria are met

So you have to call

mvn verify -Dtest=AAITCase

huangapple
  • 本文由 发表于 2023年7月17日 14:21:49
  • 转载请务必保留本文链接:https://go.coder-hub.com/76701932.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定