我有一个Jenkins工作,每次将代码推送到我的存储库时都会运行。这项工作的最后一步是运行一系列behat测试。这些测试输出了" pretty" formatter和jUnit格式化程序。 jUnit XML如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="default">
<testsuite name="Confirm that the theme is enabled" tests="1" skipped="0" failures="0" errors="0">
<testcase name="Make sure all drupal regions are present on the homepage" status="passed"></testcase>
</testsuite>
<testsuite name="Confirm that Drupal installed" tests="2" skipped="0" failures="0" errors="0">
<testcase name="Look for a body element on the homepage" status="passed"></testcase>
<testcase name="Make sure users can login" status="passed"></testcase>
</testsuite>
<testsuite name="Validate API" tests="2" skipped="0" failures="0" errors="0">
<testcase name="Show that service is available at /api/v1." status="passed"></testcase>
<testcase name="Make sure the the api/v1/page_wrapper response is valid" status="passed"></testcase>
</testsuite>
<testsuite name="Confirm main menu has installed properly." tests="1" skipped="0" failures="0" errors="0">
<testcase name="Confirm the main menu links are present." status="passed"></testcase>
</testsuite>
</testsuites>
到目前为止一切顺利。问题是最后一次测试,&#34;确认主菜单已正确安装。&#34;这是最近添加的,它从未表现得像其他人一样。它是唯一一个在测试结果概述页面中显示为根元素的兄弟。也就是说,当我点击&#34;测试结果&#34;我明白这一点:
当我点击(root)
时,我会看到所有其他测试结果。但是当我点击&#34;确认主菜单已正确安装&#34;我明白这一点:
这是没有意义的,甚至不包括我的测试用例。是什么给了什么?
答案 0 :(得分:0)
进一步审核后,问题是上次测试结果中包含的句点(.
)字符!我刚刚删除了这段时间,一切正常!