Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/477.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
Javascript 如果发生故障,如何让Jenkins发送JsUnit报告?_Javascript_Maven_Jenkins_Jsunit - Fatal编程技术网

Javascript 如果发生故障,如何让Jenkins发送JsUnit报告?

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

下面是Jankins运行的pom.xml段,但它没有在电子邮件中发送发生的错误。有人让它起作用了吗

<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模板格式化电子邮件的方法