public String toHTML(){
  String htmlID="tblTestPassed";
  String status="Succeeded";
  if (failed()) {
    htmlID="tblTestFailed";
    status="Failed";
  }
 else   if (skipped()) {
    htmlID="tblTestSkipped";
    status="Skipped";
  }
  StringBuffer buff=new StringBuffer();
  buff.append("<tr>");
  Object[] params={htmlID,name};
  buff.append(MessageFormat.format(HTMLConstants.TBL_ENTRY,params));
  params[1]=status;
  buff.append(MessageFormat.format(HTMLConstants.TBL_ENTRY,params));
  params[1]=Float.toString(timeTaken);
  buff.append(MessageFormat.format(HTMLConstants.TBL_NUM_ENTRY,params));
  params[1]=(failure != null) ? "<pre>" + failure.getStackTrace() + "</pre>" : "&nbsp;";
  buff.append(MessageFormat.format(HTMLConstants.TBL_ENTRY,params));
  buff.append("</tr>");
  return buff.toString();
}

public String toHTML ( ) { String htmlID = "tblTestPassed" ; String status = "Succeeded" ; if ( failed ( ) ) { htmlID = "tblTestFailed" ; status = "Failed" ; } else if ( skipped ( ) ) { htmlID = "tblTestSkipped" ; status = "Skipped" ; } StringBuffer buff = new StringBuffer ( ) ; buff . append ( "<tr>" ) ; Object [ ] params = { htmlID , name } ; buff . append ( MessageFormat . format ( HTMLConstants . TBL_ENTRY , params ) ) ; params [ 1 ] = status ; buff . append ( MessageFormat . format ( HTMLConstants . TBL_ENTRY , params ) ) ; params [ 1 ] = Float . toString ( timeTaken ) ; buff . append ( MessageFormat . format ( HTMLConstants . TBL_NUM_ENTRY , params ) ) ; params [ 1 ] = ( failure != null ) ? "<pre>" + failure . getStackTrace ( ) + "</pre>" : "&nbsp;" ; buff . append ( MessageFormat . format ( HTMLConstants . TBL_ENTRY , params ) ) ; buff . append ( "</tr>" ) ; return buff . toString ( ) ; }
returns html markup for this object .
