Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Cucumber 黄瓜@IntegrationTest_Cucumber_Spring Boot - Fatal编程技术网

Cucumber 黄瓜@IntegrationTest

Cucumber 黄瓜@IntegrationTest,cucumber,spring-boot,Cucumber,Spring Boot,我想为我的测试运行cucumber,但没有先运行api rest,因此我在RunCakes中包括@IntegrationTest。类,但当我运行集成测试时,应用程序不会启动 @RunWith(Cucumber.class) @CucumberOptions(format = { "pretty", "html:target/cucumber-html- report" }, dryRun = false, strict = true, features = { "classpath:featu

我想为我的测试运行cucumber,但没有先运行api rest,因此我在RunCakes中包括@IntegrationTest。类,但当我运行集成测试时,应用程序不会启动

@RunWith(Cucumber.class)
@CucumberOptions(format = { "pretty", "html:target/cucumber-html-  report" }, dryRun = false, strict = true, features = { "classpath:features" })
@IntegrationTest({ "server.port=9001", "spring.cloud.config.server.git.uri=file:./target/repos/configuration-sample", 
"spring.cloud.config.server.bootstrap=false", "ldap.uri=" , "security.ignored="})
public class RunCukesIT {

}

您很可能在寻找@WebIntegrationTest而不是@IntegrationTest。

我该如何运行api?。我运行cucumber,但我的应用程序spring boot没有运行。我不熟悉cucumber,只是注意到您使用了错误的注释。值得一试。你看过这个答案了吗?