如何在 Jenkins 中執行單一 Maven 測試案例

如何在 Jenkins 中執行單一 Maven 測試案例

在 Jenkins 中,我的工作類型為“建置 maven2/3 專案”,專案名稱為“SeleniumProject”,專案來源為“SVN”,包含大約​​ 40 個測試案例。當我建立這個時,它運行所有測試案例,其中 3 個失敗。我如何在這個專案中執行單獨的測試?這些測試用例屬於「自動化」模組。我需要在哪裡配置建置以僅運行一個測試用例?

答案1

使用-Dtest=<test class name>-Dtest=<test class name>#<test method name>按照指定http://maven.apache.org/surefire/maven-surefire-plugin/examples/single-test.html

ps:使用 StackOverflow 解決程式設計問題 - 他們會更快得到答案

相關內容