当我运行测试时,我得到了我期望从测试中得到的所有输出,例如
✔ Element <body> was visible after 12 milliseconds.
✔ Testing if element <input[id="usernameID"]> is visible.
✔ Testing if element <#usernameID> is visible.
✔ Testing if element <#passwordID> is visible.
✔ Testing if value of <#usernameID> contains: "".
但是当我打开生成的XML文件时,那里什么都没有,只有页眉,页脚和一堆空行。
<?xml version="1.0" encoding="UTF-8" ?>
<testsuites errors="0"
failures="0"
tests="2">
<testsuite name="loginTests"
errors="0" failures="0" hostname="" id="" package="login" skipped="0"
tests="2" time="15.87" timestamp="Mon, 08 Feb 2016 21:01:16 GMT">
<testcase name="Login Page Load Test" time="10.68" assertions="1">
</testcase>
<testcase name="Login/Logout Test" time="5.195" assertions="23">
</testcase>
</testsuite>
</testsuites>
以下是代码片段。
'Login/Logout Test' : function(client) {
client
.waitForElementVisible("body", client.globals.waitForConditionTimeout)
.assert.visible('input[id="usernameID"]')
.assert.visible('#usernameID')
.assert.visible('#passwordID')
.end
我必须遗漏一些简单的东西。
答案 0 :(得分:0)
显然这是它的方式......没有多大意义,但......
要从测试运行中获取此信息,请使用自定义报告器。
我已经这样做了,现在我可以把信息写在我想要的任何地方,我选择将它写入数据库表。