Update report format to a more readable one
This commit is contained in:
parent
ae627eb8f7
commit
6c605dc0b0
@ -15,9 +15,9 @@ report.results = results => {
|
||||
|
||||
results.issues.forEach(issue => {
|
||||
suite.testCase()
|
||||
.className(issue.selector)
|
||||
.name(issue.context)
|
||||
.failure(issue.message);
|
||||
.className(issue.code)
|
||||
.name(`[${results.pageUrl}] ${issue.selector}`)
|
||||
.failure(`${issue.message}\n\nContext: ${issue.context}`);
|
||||
});
|
||||
return builder.build();
|
||||
};
|
||||
|
@ -59,14 +59,14 @@ describe('lib/reporter', () => {
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuites>
|
||||
<testsuite name="http://mock-url/" tests="3" failures="3" errors="0" skipped="0">
|
||||
<testcase classname="mock-selector-1" name="mock-context-1">
|
||||
<failure message="mock-message-1"/>
|
||||
<testcase classname="mock-code-1" name="[http://mock-url/] mock-selector-1">
|
||||
<failure message="mock-message-1

Context: mock-context-1"/>
|
||||
</testcase>
|
||||
<testcase classname="complex > mock-selector-2" name="<span class="mock-context-2">foo</span>">
|
||||
<failure message="mock-message-2"/>
|
||||
<testcase classname="mock-code-2" name="[http://mock-url/] complex > mock-selector-2">
|
||||
<failure message="mock-message-2

Context: <span class="mock-context-2">foo</span>"/>
|
||||
</testcase>
|
||||
<testcase classname="mock-selector, "with bad" characters" name="mock-context, "with bad" characters">
|
||||
<failure message="mock-message, "with bad" characters"/>
|
||||
<testcase classname="mock-code, "with bad" characters" name="[http://mock-url/] mock-selector, "with bad" characters">
|
||||
<failure message="mock-message, "with bad" characters

Context: mock-context, "with bad" characters"/>
|
||||
</testcase>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
Loading…
Reference in New Issue
Block a user