我有几个量角器测试脚本。我的目标是根据脚本和结果生成一些报告。
我想在每个测试中附加一些附加信息,例如 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
}
}
Run Code Online (Sandbox Code Playgroud)
并在输出 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 …Run Code Online (Sandbox Code Playgroud)