1

As far as I understand(beginner level on Spring Cloud Contract), the contract tests generated from the groovy contracts are with junit. What if I want to use TestNG? Basically I want to group my tests with TestNG annotation @Test(groups="unit") and @Test(groups="contract") in order to separate unit tests and contract tests using ssomething like mvn test -Dgroups=unit and mvn test -Dgroups=contract.

Thank you for your help.

4

1 回答 1

1

目前,我们不支持开箱即用。您必须编写自己的org.springframework.cloud.contract.verifier.builder.SingleTestGenerator实现(例如,通过扩展JavaTestGenerator并在文件中引用它spring.factories),但不幸的是,这可能非常耗时。

于 2017-05-17T08:59:37.213 回答