| || |
Why do we need to include these 2 header files:
and why is as_web.h included in all the 3 sections of the script i.e in init,action& end.Isn't including just in the init part sufficient?
Re: Header Files
This is a great opportunity for investigation. Go to the loadrunner home directory\include and open up each one of the files with Notepad. There are some core items required for the type of protocol you are working with. It will make great sense once you read through the files.
As to why it is included in every single section? Could be a build specific error. I just checked out the vuser files for users created with 7.6 and 7.8, only as_web.h is repeated once with inclusion in both the actions and end sections. You're right, you only need one. When the user is executed all of the files get GCC'd together into one big C program which is then handed off to MDRV for execution. Since it is mostly prototypes in the headers you are not likely to get a redefinition error.
if it makes you really uncomfortable having this second instance, go to the loadrunner home directory\templates and look for the home directory of \QTWEB (7.6 and above). Modify the end.c file in the template directory to remove the redundant as_web.h include statement. Any new script should now be unaffected.
Replace ineffective offshore contracts, LoadRunnerByTheHour
. Starting @ $19.95/hr USD.
Put us to the test, skilled expertise is less expensive than you might imagine.
Twitter: @LoadRunnerBTH @PerfBytes
Re: Header Files
Actually it doesn't metter that as_web.h is included several times, as its body is inside
so it will actually be included only once.
Regarding lrw_custom_body.h - this file is properly for your convenience, if you have some huge HTTP requests (recorded with web_custom_request), which you want to put in separate file (so that the script itself would look better).