Javascript 如果发生故障,如何让Jenkins发送JsUnit报告?
下面是Jankins运行的pom.xml段,但它没有在电子邮件中发送发生的错误。有人让它起作用了吗Javascript 如果发生故障,如何让Jenkins发送JsUnit报告?,javascript,maven,jenkins,jsunit,Javascript,Maven,Jenkins,Jsunit,下面是Jankins运行的pom.xml段,但它没有在电子邮件中发送发生的错误。有人让它起作用了吗 <plugin> <groupId>de.berlios.jsunit</groupId> <artifactId>jsunit-maven2-plugin</artifactId> <executions> <exe
<plugin>
<groupId>de.berlios.jsunit</groupId>
<artifactId>jsunit-maven2-plugin</artifactId>
<executions>
<execution>
<id>test</id>
<configuration>
<sourceDirectory>./WebContent/jsunit</sourceDirectory>
<sources>
<source>blah.js</source>
</sources>
<testSourceDirectory>./WebContent/jsunit</testSourceDirectory>
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
<testSuites>
<testSuite>
<name>SampleSuite</name>
<type>TESTCASES</type>
<includes>
<include>blah_test.js</include>
</includes>
</testSuite>
</testSuites>
</configuration>
<goals>
<goal>jsunit-test</goal>
</goals>
</execution>
</executions>
</plugin>
de.berlios.jsunit
jsunit-maven2-plugin
测试
./WebContent/jsunit
诸如此类
./WebContent/jsunit
${project.build.directory}/surefire报告
样本套件
测试用例
blah_test.js
单元测试
Jenkins在默认情况下不会这样做,但是如果使用,您可以配置构建电子邮件,以包含来自控制台输出的任何您喜欢的数据。您可能还想看看使用Jelly模板格式化电子邮件的方法