Solving VuGen Script Generation Errors
On very rare occasions you may encounter a web-based application that causes VuGen to throw an error during code generation. Every time this has happened to me, it has been solvable without having to talk to HP Software Support. Read on for my tips…

When this problem occurs, you will see that both the Recorded Events Log and the Recording log show that HTTP requests and responses have been captured, but the Code Generation Log is empty.



Fortunately, it is usually not even necessary to re-record the script, because VuGen has a neat “Regenerate Script” feature, which will allow you to experiment with the different recording settings that are applied during the VuGen code generation stage.

Note that when you regenerate your script, it will overwrite any changes you have made to the code. But comments and transactions added during recording and any correlation performed automatically with Correlation Rules will still be included in your newly generated script.

Regenerating the script as a URL-based script with “Use web_custom_request only” enabled is a work-around for some script generation problems, but it can result in a very verbose script to work with.

Changing the supported character set will sometimes solve code generation problems too. EUC-JP is a multi-byte format for representing characters from Asian langages (s0 I have never come across this one), but changing to UTF-8 (which is disabled by default in VuGen) has solved code generation problems for me several times.

Recording the script using the earlier recording engine sometimes solves code generation problems, but note that you actually do have to re-record the script using the old recording engine, you can’t just regenerate the script. Remember to restart VuGen after ticking the “Record script using earlier recording engine” checkbox or the new recording engine will still be used.
Recording the script with a Multiple Protocol vuser type, with Web and Windows Sockets (even though your application only sends and receives HTTP) sometimes also fixes code generation problems as this forces a different recording engine to be used. I am fairly sure that this just forces VuGen to use the same “earlier” recording engine mentioned previously, but cannot confirm without doing further investigation. This is worth a try anyway if you are still having problems.

So, in summary…
- Regenerate your script with a different recording mode (try “Use web_custom_request only”).
- Try a different character set. Check or un-check “Support charset UTF-8″
- Re-record the script with the old recording engine (remember to restart VuGen).
- Re-record the script with a Multiple Protocol Web + Windows Sockets vuser.
Related posts:
- Testing Web Services With a Standard Web Vuser It is possible to test web services using the standard...
- Persistent Data in VuGen with MySQL One of the main drawbacks with VuGen is the inability...
- Harvesting file names with VuGen VuGen isn’t just a tool for load testing and application...
- What’s New in LoadRunner 9.50? LoadRunner 9.5 was released today and, as mentioned by the...
- VuGen Scripting for YouTube Video Video has seen a massive surgance on the internet with...
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
April 19th, 2008 at 9:05 pm
Hello Stuart,
A bunch of Thanks to you, the above illustration has helped me to resolve the issue.
Great contribution from your side.
Thanks once again
Herbert
[Stuart's Reply: Glad that we could help, Herbert.]
June 6th, 2008 at 12:08 am
Hey,
THANKS a TON
the explanation given here is too good. It solved my problem so quickly.
Hats off to you.
September 18th, 2008 at 12:36 am
Thanks a tons for your help. Your knowledge is truly impressive. Thanks much.
Regards
Padmakumar.
November 26th, 2008 at 7:42 pm
Hello Stuart,
I’m having the same problem using loadrunner 9.1.
I’ve tried your suggestion but no one solve the problem.
I’m recording webservices application and I use GLUE 6. Anyway I ‘m able to generate script using GLUE 5. Have you any other idea about this?
Also, I’m not able to see the Recording Engine checkbox option in my vugen. So I can’t try using old recording engine. Why?
Thanks a lot,
Alciam
[Stuart's Reply: The "record script using earlier recording engine" option is not available for the Web Services vuser; it is only available for the Web (HTTP/HTML) virtual user.
I am not sure why your Web Services vuser works with webMethods GLUE 5.x, but not for GLUE 6.x. I am happy to take a look if you send me your scripts.]
October 14th, 2009 at 12:42 am
You can go for following options-
(1) Opt for diff charset
(2) Select Window Sockets
(3) Try Url method of recording
(4) Try different combinations of Recording Options
OR
RESTART UR MACHINE !!..sure shot solution to this issue.
October 14th, 2009 at 8:21 am
Hi Rajat,
I would have to disagree with your idea of recording an HTTP-based application using the Windows Sockets (Winsock) vuser type.
A reboot is always a good idea though.
Cheers,
Stuart.
December 9th, 2009 at 9:18 am
I am recording a VuGen (9.5) script simulating a user that executes a SQL query (or stored proc) using MS SQL Query Analyzer.
If I specify multiple protocol and choose the ODBC protocol I am able to launch Query Analyzer and record my script, but if I use single protocol ODBC I get an access violation when it tries to launch Query Analyzer.
So, your advice to try recording with the multi-protocol vuser can solve recording problems for other protocols too, not just Web.