HP LoadRunner Protocol SDK
How Protocols Work During Code Generation

How Protocols Work During Code Generation

After a recording session, LoadRunner has a collection of record-time events. These events have to be processed into script steps, with each protocol creating the steps (generally API calls) specific to the protocol. The end result is a VuGen script. This process is called code generation.

During code generation, the events are passed to filters that iterate over those events, discard unnecessary information and logically connect related information from multiple events. Some filters are part of the LoadRunner infrastructure—for example, the filter that generates lr_think_time events. Some filters are provided by the protocols.

Each filter produces a new set of events at a higher level. These are the input for the next filter. The filtering process ends when each event can be converted into a step, comment, or declaration. At this point, the LoadRunner infrastructure creates the script.

The following example illustrates one possible flow of the code generation process. The order of filters and the placement of built-in filters will vary with different protocols and combinations of protocols.