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...

Error during code generation. The vuser Script was not generated.

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.

VuGen Recorded Events Log

VuGen Recorded Events Log

VuGen Generation Log

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.

VuGen Regenerate Script menu option

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.

VuGen Regenerating the script will overwrite any manual changes. Only recorded actions will be effected. Click OK to overwrite the 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.

VuGen Recording Settings > URL-based script > Use web_custom_request only

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 (so 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.

VuGen Advanced Recording Options

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.

VuGen Multiple Protocol Web (HTTP/HTML) + Windows Sockets script

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.

Tech tips from JDS

10 comments

hi.. did any one tried outlook web access…please help me with challanges and how to ver come..

Hi Stuart,

None of the above solutions worked out for me. I even tried rebooting my system.

I am using web and flex protocols.

Regards,
Suma.

Thanks for the tip! Enabling the UTF-8 encryption did the trick!

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.

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.

Stuart Moncrieff
Stuart Moncrieff

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.

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.]

Thanks a tons for your help. Your knowledge is truly impressive. Thanks much.
Regards
Padmakumar.

Hey,

THANKS a TON
the explanation given here is too good. It solved my problem so quickly.

Hats off to you.

Herbert Naripati

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.]

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.