JBEHAVE或SUREFIRE可以报告JunitStories测试套件的单个测试吗?



我使用surefire maven插件

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-surefire-plugin</artifactId>
  <version>2.18.1</version>
  <configuration>
    <argLine>-Dhttp.proxyHost=${http.proxyHost}
      -Dhttp.proxyPort=${http.proxyPort}</argLine>
  </configuration>
 </plugin>

使用Junitstories进行多个JBEHAVE测试

public class SystemTest extends JUnitStories {
  protecetd List<String> storyPaths() {
    // returns a list of multiple JBehave files
  }
}

并获取总结整个测试套件的单线报告:

-------------------------------------------------------------------------------
Test set: <path>.SystemTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 12.803 sec - 
in <path>.SystemTest

我可以配置junitstories或肯定之火,以便我为StoryPath()给出的每个文件都能获得一行

尝试了一段时间的配置后,我放弃并写了一个自定义的jbehave记者,该记者写了多个junit结果文件,每个故事文件一个。

最新更新