我phantomjs和我詹金斯服务器上的工作casperjs接受的xUnit XML日志。 该测试已执行且成功。但这里的东西:詹金斯不是从casperjs
Casperjs记录其结果在log.xml文件。我想我可以在我的jenkins webUI上显示该xml文件的内容。我发现詹金斯是xUnit的插件,但预期它不工作:
[37; 42; 12次1mPASS在22.324s执行12通过测试,0失败,0 半信半疑,0跳过。 [0米
正如你可以看到测试是全成
[32; 1mResult日志存储在../../build/frontendtests/log.xml
[0米出版三叶草覆盖报告...出版四叶草XML 报告...出版三叶草覆盖效果...记录测试结果 [的xUnit] [INFO] - 在开始录制。 [的xUnit] [信息] - 处理 AUnit-3.X(默认)[的xUnit] [信息] - [AUnit-3.X(默认)] - 1个测试 报告文件(一个或多个)被发现与图案 '为测试框架 'AUnit-3.x(默认)'建立/ frontendtests/log.xml'相对于 '。 [xUnit] [错误] - 结果文件 '对于 度量标准'AUnit'无效。结果文件已被跳过。 [xUnit] [INFO] - 失败BUILD,因为'set build failed if error'选项被激活。
Jenkins构建失败,因为我的log.xml不支持AUnit。我也试过JUnit和JSUnit。同样的结果。但我不明白。 casperjs输出xunit xml文件,我安装了xunit插件。但该插件不读取我的log.xml。
你有什么解决办法吗?也许我的詹金斯设置是错误的?有任何想法吗?
谢谢...
这里是我的log.xml
<?xml version="1.0" encoding="UTF-8"?> <testsuites duration="3.859">
<testsuite name="Checking the portal search for http://www.xxx.de/suche/jeans" tests="1" failures="0" errors="0" time="2.687" timestamp="2013-08-20T14:12:55.953Z" package="./execute_search_tests">
<testcase name="Subject equals the expected value" classname="./execute_search_tests" time="2.687"></testcase>
<system-out></system-out>
</testsuite>
<testsuite name="Checking the portal search for http://www.xxx.de/suche/asjdfkshjkfhdsjkafhkjasd" tests="1" failures="0" errors="0" time="1.172" timestamp="2013-08-20T14:12:55.954Z" package="./execute_search_tests">
<testcase name="Subject equals the expected value" classname="./execute_search_tests" time="1.172"></testcase>
<system-out></system-out>
</testsuite> </testsuites>
谢谢,我选了#1。这很容易建立。这里有一个关于同一问题的另一个可能解决方案的链接:https://groups.google.com/forum/?hl=de#!topic/casperjs/n1tbi0K9Tnk(我没有尝试,但听起来很合理,但它可能有点肮脏的解决方案 –
你是对的。 – coffeebreaks