我正在使用Jenkins + Maven + Java进行连续测试,最近添加了Thucydides + JBehave。我对Jenkins和Thucydides很新,所以我在显示构建报告方面遇到了麻烦。
我没有权利更改Jenkins配置,所以我无法添加一些插件来正确显示Thucydides报告。我可以使用现有的Jenkins插件将Thucydides报告附加到构建中,但我还需要一些标准的JUnit报告(用于正确的电子邮件通知等)。
JUnit"认为"有28个测试,实际上有6个场景。 Failsafe插件生成报告xml文件,其中:
<testcase time="0.027" classname="java.lang.Object" name="BeforeStories"/>
<testcase time="0.032" classname="TestPhucydidesJBehave.jbehave.DefinitionSteps" name="Given 2"/>
<testcase time="0.002" classname="TestPhucydidesJBehave.jbehave.DefinitionSteps" name="When adding 3"/>
<testcase time="0.003" classname="TestPhucydidesJBehave.jbehave.DefinitionSteps" name="Then equals to 5"/>
<testcase time="0.011" classname="Scenario: 2 + 3 = 5" name="Scenario: 2 + 3 = 5"/>
<testcase time="0.002" classname="TestPhucydidesJBehave.jbehave.DefinitionSteps" name="Given 3"/>
<testcase time="0.002" classname="TestPhucydidesJBehave.jbehave.DefinitionSteps" name="When adding 3\u200B"/>
<testcase time="0.002" classname="TestPhucydidesJBehave.jbehave.DefinitionSteps" name="Then equals to 6"/>
<testcase time="0.009" classname="Scenario: 3 + 3 = 6" name="Scenario: 3 + 3 = 6"/>
<testcase time="0.002" classname="TestPhucydidesJBehave.jbehave.DefinitionSteps" name="Given 3\u200B"/>
<testcase time="0.003" classname="TestPhucydidesJBehave.jbehave.DefinitionSteps" name="When adding 4"/>
<testcase time="0.002" classname="TestPhucydidesJBehave.jbehave.DefinitionSteps" name="Then equals to 7"/>
<testcase time="0.01" classname="Scenario: 3 + 4 = 7" name="Scenario: 3 + 4 = 7"/>
<testcase time="0.014" classname="Additional.story" name="Additional.story"/>
<testcase time="0.003" classname="TestPhucydidesJBehave.jbehave.DefinitionSteps" name="Given 2\u200B"/>
<testcase time="0.001" classname="TestPhucydidesJBehave.jbehave.DefinitionSteps" name="When adding 2"/>
<testcase time="0.003" classname="TestPhucydidesJBehave.jbehave.DefinitionSteps" name="Then equals to 4"/>
<testcase time="0.01" classname="Scenario: 2 + 2 = 4" name="Scenario: 2 + 2 = 4"/>
<testcase time="0.002" classname="TestPhucydidesJBehave.jbehave.DefinitionSteps" name="Given 3\u200B\u200B"/>
<testcase time="0.001" classname="TestPhucydidesJBehave.jbehave.DefinitionSteps" name="When adding 5"/>
<testcase time="0.002" classname="TestPhucydidesJBehave.jbehave.DefinitionSteps" name="Then equals to 8"/>
<testcase time="0.009" classname="Scenario: 3 + 5 = 8" name="Scenario: 3 + 5 = 8"/>
<testcase time="0.004" classname="TestPhucydidesJBehave.jbehave.DefinitionSteps" name="Given 3\u200B\u200B\u200B"/>
<testcase time="0.005" classname="TestPhucydidesJBehave.jbehave.DefinitionSteps" name="When adding 6"/>
<testcase time="0.001" classname="TestPhucydidesJBehave.jbehave.DefinitionSteps" name="Then equals to 9"/>
<testcase time="0.008" classname="Scenario: 3 + 6 = 9" name="Scenario: 3 + 6 = 9"/>
<testcase time="0.012" classname="Simple.story" name="Simple.story"/>
<testcase time="0.006" classname="java.lang.Object" name="AfterStories"/>
你可以看到那里有很多东西。我不知道如何解释&#34;对于Failsafe和JUnit来说,&#34;测试&#34; - 只是场景。
任何提示都会非常有用!