我有一对量角器测试脚本。我的目标是根据脚本和结果生成一些报告。如何将附加信息附加到测试规范?
有有一些,我想连接到每个测试,像一个id或参考号的附加信息。有没有办法将它添加到每个it
规格?我不需要茉莉花或量角器对此信息做任何事情,最多也只是将它包含在测试结果输出文件中。
我想是这样的:
describe('Module A Test Suite', function() {
// note parameter with extra info
it('This is a test', {testId: 123, release: "v2.0.5"}, function() {
//note parameter with extra info
expect({description: "Verify link is shown", priority: 2}, element(by.id('Home')).isPresent()).toBe(true);
// more tests and expect's here
}
}
而且具有与额外的信息输出XML一些部分。
可能导致这样的事情:
<testsuites>
<testsuite name="chrome.Module A Test Suite" timestamp="2016-11-22T11:22:45" hostname="localhost" time="77.753" errors="0" tests="8" skipped="0" disabled="0" failures="3">
<extras testId="123" release="v2.0.5" />
<testcase classname="chrome.Module A Test Suite" name="This is a test" >
<extras description="Verify link is shown" priority="2"/>
</testcase>
</testsuite>
</testsuites>
如果不能添加代码本身,是有办法,这可以作为意见或可以很容易地分析其他元素?最好使用现有的工具或茉莉花/量角器功能?