我使用带有Serenity的Springboot作为UI测试框架,我想将黄瓜添加到我的项目中。 我的问题是,Test不会启动我的Springboot测试应用程序。你能帮我么? 我的依赖项:
testCompile("net.serenity-bdd:serenity-core:${serenityVersion}")
testCompile("net.serenity-bdd:serenity-junit:${serenityVersion}")
testCompile("net.serenity-bdd:serenity-spring:${serenityVersion}")
testCompile("net.serenity-bdd:serenity-cucumber:${cucumberVersion}")
testCompile("info.cukes:cucumber-java:1.2.5")
My Serenity / Cucumber测试(FrontendTestApplication使用@SpringbootApplication注释):
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT, classes = {FrontendTestApplication.class})
@RunWith(CucumberWithSerenity.class)
public class InputStationCucumber {
}
如果我运行我的旧测试,everthing工作正常,但此测试不会启动我的Springboot应用程序。
你们能帮助我吗?
此致 拉斯
答案 0 :(得分:-1)
我发现了错误。
您必须使用SELECT 1 AS Urut, M.Kode_Project, M.Nama_Project, M.Kode_Panel, D .Nama_Stater1, D .Tipe, D .Komponen, D .Pole, D .Amps, D .Merek, D .Qty, D .IsTitipan
FROM TransM M INNER JOIN
TransD D ON M.Kode_Project = D .Kode_Project AND M.Kode_Panel = D .Kode_Panel
WHERE M.Kode_Project = '17-0002' AND M.Kode_Panel = 'A'
UNION ALL
SELECT 2 AS Urut, M.Kode_Project, M.Nama_Project, M.Kode_Panel, M.Nama_Stater1, 'COOPER (' + SubString(Kode, 5, 100) + ')' AS Tipe,
' (' + LT + ') X ' + CONVERT(VarChar(20), Lapis) AS Komponen, '' AS Pole, '' AS Amps, ' IMPORT ' AS Merek, 1 AS Qty, 0 AS IsTitipan
FROM TransM M INNER JOIN
TransW W ON M.Kode_Project = W.Kode_Project AND M.Kode_Panel = W.Kode_Panel
WHERE LEFT(Kode, 1) <= 'B' AND M.Kode_Project = '17-0002' AND M.Kode_Panel = 'A'
注释定义类的步骤,而不是运行器类。