Bugs item #3524317, was opened at 2012-05-07 02:48
Message generated for change (Tracker Item Submitted) made by serban_ghita
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=547455&aid=3524317&group_id=76550
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Web tester
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Serban (serban_ghita)
Assigned to: Marcus Baker (lastcraft)
Summary: HtmlReporter should not declare paintFail
Initial Comment:
I was creating a custom reporter by extending the class HtmlReporter.
I've modified both paintPass($message) and paintFail($message) and noticed that the fails were echoed twice.
class FancyHtmlReporter extends HtmlReporter {
[...]
function paintFail($message) {
parent::paintFail($message);
echo '<span style="background:red; color:white; padding:0 5px;">Fail</span>: ';
$breadcrumb = $this->getTestList();
array_shift($breadcrumb);
print implode(" -> ", $breadcrumb);
print " -> " . $this->htmlEntities($message) . "<br />\n";
}
[...]
}
This is because FancyHtmlReporter::paintFail($message) calls HtmlReporter($message) through parent::paintFail($message) which duplicates the error message. If I remove paret:paintFail($message), the error doesn't get counted anymore.
I've removed paintFail() method from HtmlReporter() and i'm not getting any duplicate outputs.
PS: you can also replicate this by modifying in /test/visual_test.php the PassesAsWellReporter class, just add a custom paintFail($message) method, and refresh.
Thanks!
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=547455&aid=3524317&group_id=76550
|