n1k0/casperjs — pull request #897 by T0RAT0RA (2014-04-22 14:34:03+00:00)
Title: Use failure/success name attribute.

Hi,

when a test fail, I take a screenshot and add some debug info to failure.message:

```
casper.test.on("fail", function (failure) {
"use strict";
var capturefile = "reports/casper/" + failure.suite + "." + failure.line + ".png",
page = "Page: " + casper.getCurrentUrl(),
screenshot = "Screenshot: " + exports.siteUrl + "/tests/" + capturefile,
messages = "Console: " + "\n " + remoteMessages.join("\n ");
failure.message = (failure.message? failure.message : failure.standard) + "\n" + [page, screenshot, messages].join("\n");
casper.capture(capturefile);
});
```

the problem is, the testcase will contain all this debug information.
All I want is have it in the node.

Thanks.