| || |
Vugen /Loadrunner Scripting Question
I just started using VuGen Scripting and HP ALM Performance Center about 3 weeks ago. I have a question regarding what I think should be a straightforward script, but I have scoured the net and forums and no one seems to have the same issue. I know modifying the code to do this is possible, but the application is built and I am on a tight timeline.
I am using the HTTP/HTML protocol to record an ASP.NET application and all I want to do is record one INSERT into our database. Two other subsequent URLs in the recorded script are using the "Primary Key (GUID)" as querystring parameters. My question is:
Is there any way to retrieve that "Primary Key GUID" value and parameterize the subsequent 2 URL's in the script?
So, in step by step order:
1) Insert record in to database (this creates the PK GUID) (recorded by VuGen)
2) C code to connect to database and retrieve PK GUID of Step #1 (NOT recorded by Vugen)
3) POST whereby the PK GUID is used in the URL (recorded by Vugen, but I want to parameterize this with step #2 value)
4) another POST whereby the PK GUID is used in the URL (recorded by Vugen, but I want to parameterize this with Step #2 value)
I have tried ODBC, but can not figure out the internals of how the ODBC library files work together. Is there any sample code that anyone can help me with? Or an easier or suggested way of how to do this?
Any help would be appreciated. Thank you all.
Did you find whether GUID is getting generated in some specific sequence? If it so, you can use parameter to generate that value ans substitute in request URL where required.
The GUID is generated in the code behind of the ASP.NET page. It is then used in subsequent calls to a couple of web services. The issue is although I could parameterize the GUID recorded in to the URL in the next line of scripting, each insert each VUser is doing must get the corresponding GUID that was just inserted.
So, I have:
1st URL using GUID (recorded)
2nd URL using GUID (recorded)
I can not use an abitrary GUID parameter in the 1st and 2nd URL as there is logic used with the new record's GUID. The URL's are created using the new GUID of the inserted record. Changing the code to accommodate Load Testing would require time and resources.
Have you been through training on the tool?
Have you been assigned to an internship for your first six months to a year?
Episode #35 Dynamic Data Correlation | PerfBytes
Thanks for the link jpulley. No, I have not gone through training, just self training. No, no internship either.
Then your management has set you up for failure. This is a tool which sets on top of a large set of foundation skills. The tool is only 5-15% of the job.
And, as to #2 . You are adding a non optimized query which is not there in production. Given previous examples of this behavior the addition of this code with your direct query will cause performance issues which will never occur in production. This is why you need a mentor for a period of time after shoring up your foundation skills, training in process and tools.
Your GUID is either generated by local code on the client or it is sent to you from the server. In either case it would be improper to connect to the database directly for the management of this in your script. EFFECTIVE tool training from an HP Credentialed Instructor on HP Materials is the most consistent path to understanding the concepts and the use of the tool. There are other options, but they are more effective at taking your money than they are at actually providing effective training.
Last edited by jpulley3; 09-09-2014 at 03:41 PM.
Thanks for the feedback. As our company is not software development specialized, load testing was never a major priority.
I understand that there is no simple shortcut for what I want to do and I understand that I won't get this in a day's worth of work. Also, I won't gain the experience I need in a few weeks of work, I get that. But, I am committed to doing the best I can here though and so I need some way to resolve this.
You are correct in that putting in code to retrieve this value would not work and would incur extra overhead/load that would not be in production.
jpulley, can you tell me if dynamic data correlation is the way to do this? I need some advice on what direction I should be looking so I can learn how to begin this.
Sounds like you have one path available, read the books.
Thanks for the great advice. Instead of just saying "yes" or "no" you are on the right track, I get a moderator of the forum that tells me that I am on the track to "failure". All you can do is read the books?
It's amazing that doing a quick search on this forum and I see you and another mod that quoted the same thing to another user. That anyone that posts on this forum that does not have formal training in LR is headed for inevitable failure. That's why I'm on this forum, to learn what I can from experts.
With your clue of Dynamic Data correlation I was able to to do the piece of correlation properly. Thanks for providing that small piece of advice. And the script is working, albeit with another issue that I'm trying to find the solution to.
Hey jpulley3, I get why you're telling people that they are doomed to fail, because your business LoadRunnerByTheHour is all about Load Runner experts. I guess to discourage anyone to even attempt to use LoadRunner takes business away?
Man, that is one underhanded way to do business.