LoadRunner – Comment

‘Comment’ has its own importance in software coding. This helps to understand the software code and its flow. The comment is always written in a simple and human-readable format. If a new person reads the code then he can easily understand the purpose of the code with the help of comments. The LoadRunner script comment has the same objective.

Hence it is always advisable to write the comment for every transaction or important steps in the LoadRunner script.

You can add comments in two ways:

1. At the time of recording

While recording the script click the ‘Insert Comment’ button to add a comment at the desired step. This option is less preferable because recording events are increased continuously and due to delay in writing the comment, they are misplaced. The alternate option is to write the comments when recording events are paused i.e. in between two steps or transactions.

LoadRunner - Insert Comment
Figure 01: ‘Insert Comment’ at the time of recording

2. At the time of script editing

Once you complete all the modifications in the script like Parameterization, Correlation etc. then manually add the comment in the script. LoadRunner follows C++ comment syntax.

  1. Single-line Comment
//Payment Gateway Flow Started
  1. Multiline Comment
web_add_cookie("NID=196=ZUqpVqxCXgX; DOMAIN=abc.com");
web_add_cookie("NID=196=ZUqpVqxCXgY; DOMAIN=abc.com");
web_add_cookie("NID=196=ZUqpVqxCXgZ; DOMAIN=abc.com");

You may be interested:

Leave a Comment