public function paintFail($message)
{
//only get the first failure or error
if (!$this->fail && !$this->error) {
$this->fail = true;
$this->message = self::escapeVal($message);
$this->listener->write('{status:"fail",message:"' . $this->message . '",group:"' . $this->group . '",case:"' . $this->case . '",method:"' . $this->method . '"}');
}
}