preload

Test Log Functions (WinRunner, TSL)

Posted by Albert Gareev on Nov 17, 2007 | Categories: Reporting

Reporting with WinRunner  built-in functions


public function log_step_pos(in msg, in descr) {
 report_msg(_const_log_indent & substr(msg,1,50) & " - *PASS* - " & substr(descr,1,50));
}

public function log_step_pass(in msg, in descr) {
 tl_step(substr(msg,1,100),PASS,substr(descr,1,100));
}

public function log_step_neg(in msg, in descr) {
 tl_step(substr(msg,1,100),FAIL,substr(descr,1,100)); 
}

public function log_step_info(in msg, in descr) {
 report_msg(_const_log_indent & substr(msg,1,50) & " - *info* - " & substr(descr,1,50));
}

public function log_step_msg(in msg, in level) {
 auto rc, i,c, indent;
 rc = match(substr(level,1,1), "[0-9]");
 if (rc == 1)
  c = level;
 else
  c = 0;
 indent = "";
 for (i=1;i<=c;i++)
  indent = indent & _const_log_indent;
    
 report_msg(indent & substr(msg,1,50));
}


Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported
This work by Albert Gareev is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported.