MyLoadTest / IDocWizard

A LoadRunner extension to enable users to generate SAP IDoc files.
2 stars 0 forks source link

Highlighting of messages in the Replay log #8

Open StuartMoncrieff opened 11 years ago

StuartMoncrieff commented 11 years ago

When special messages are written to a script's replay log (output.txt) VuGen will automatically highlight them. It does this based on pattern matching of the first word of the message. e.g.

lr_output_message("foo"); // message in log is black (default)
lr_output_message("Notify: foo"); // message in log is blue
lr_output_message("Warning: foo"); // message in log is purple
lr_output_message("Error: foo"); // message in log is red
lr_error_message("foo"); // output text is "Error: foo", so messages written with lr_error_message are always highlighted red.

Some output and error messages in idoc.dll can be modified to take advantage of this feature. e.g.

lr_error_message("[%s] ERROR: Valid license is not specified. Call idoc_set_license() first.", __FUNCTION__);
// Replay log output: 
// Action.c(31): Error: [`anonymous-namespace'::ensure_valid_license] ERROR: Valid license is not specified. Call idoc_set_license() first.

alternative:

lr_error_message("Valid license is not specified. Call idoc_set_license() first.");
// Replay log output: 
// Action.c(31): Error: Valid license is not specified. Call idoc_set_license() first.
StuartMoncrieff commented 11 years ago

Removed redundant "ERROR:" from in lr_error_message output in b473bd160559341ac0e1c44ea6febc1a5183c5fb on 2013-08-11.