The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:




Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> HP / Mercury LoadRunner

Pages: 1
ChicagoTester
Member


Reged: 02/27/05
Posts: 356
Loc: New York
Data need to be correlated but not in the response
      #719315 - 11/05/12 11:32 AM

team, I am facing a weird issue with my current project, i am seeing in the recording some IDs and timestamp which need to be correlated, but the problem is i don't see these data in the response, i see them in the requests!!

I don't understand how to correlate them if i don't see them in the response!!

for example, dc id which I see it in the request header:

*******Request Header For Transaction With id 155******
Get_dc=13516767347673&action=workflowview&workflowName=
Accept:*/*
Accept-Language:en-us

and timestamp also in the request body:
***********Response Body For Transaction With Id 116******
{timestamp:'1351615160988',items

any idea on how to correlate these data? thanks in advance

--------------------
my profile: http://www.sqaforums.com/showflat.php?Cat=0&Number=408054&an=0&page=1&gonew=1#UNREAD


Post Extras: Print Post   Remind Me!   Notify Moderator  
James PulleyModerator
Moderator


Reged: 08/01/01
Posts: 5551
Loc: NC
Re: Data need to be correlated but not in the response [Re: ChicagoTester]
      #719317 - 11/05/12 11:52 AM

The timestamps typically are calculated locally. There are a number of paths you can take, from using the standard C time structures to pull in the thirteen digit values to include in your script. There are also some LoadRunner functions hiding out in the lrun.h file that you could look at as well.

--------------------
James Pulley

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


Post Extras: Print Post   Remind Me!   Notify Moderator  
xtom
Member


Reged: 01/19/04
Posts: 100
Loc: Germany
Re: Data need to be correlated but not in the response [Re: James Pulley]
      #719339 - 11/05/12 08:50 PM

Hello!

You can create a content check rule that contains the ID as pattern. This will show you the first request in the script that gets the server response containing the ID. Prerequisit is that you know the exact value for the ID in advance. But if you record the script, find the ID, create the Content Check rule and replay the script this may help you.

Regards
Thomas

--------------------
xtom


Post Extras: Print Post   Remind Me!   Notify Moderator  
LoadRunner421
Member


Reged: 05/06/11
Posts: 142
Re: Data need to be correlated but not in the response [Re: xtom]
      #719373 - 11/06/12 06:26 AM

Maybe speak with someone and find out how those numbers are used server side. Then based on that information you can create your own paramater .dat files instead of doing correlation.

Post Extras: Print Post   Remind Me!   Notify Moderator  
ChicagoTester
Member


Reged: 02/27/05
Posts: 356
Loc: New York
Re: Data need to be correlated but not in the response [Re: LoadRunner421]
      #719375 - 11/06/12 06:38 AM

James, thanks for your reply, i was able to get the timestamp correlated, thanks

xtom: thanks for your reply, I tried content check, but the problem with content check it will find the value after it being used, i want to get it before it being used

LoadRunner421: thanks for your reply, I tried this approach already, it didn't work, I tried to create some random values with the same format but it didn't work...

--------------------
my profile: http://www.sqaforums.com/showflat.php?Cat=0&Number=408054&an=0&page=1&gonew=1#UNREAD


Post Extras: Print Post   Remind Me!   Notify Moderator  
LoadRunner421
Member


Reged: 05/06/11
Posts: 142
Re: Data need to be correlated but not in the response [Re: ChicagoTester]
      #719379 - 11/06/12 07:14 AM

You're welcome :-)

But did you talk to someone and find out what the values should be or did you just guess?

If you don't know exactly how the number is used when passed to the server, then your "random values in the same format" are probably not actually in the right format. Yes there are 14 digits but the number may be parsed somehow or it may be an ID.

Like what does the server do with this number when it gets it?: 13516767347673

Once you find the answer to that question, then you'll know how to feed the server. What you know so far is that the number definitely isn't just a random number.


Post Extras: Print Post   Remind Me!   Notify Moderator  
James PulleyModerator
Moderator


Reged: 08/01/01
Posts: 5551
Loc: NC
Re: Data need to be correlated but not in the response [Re: LoadRunner421]
      #719380 - 11/06/12 07:46 AM

"13516767347673" is a 14-digit time stamp for number of ten-thousandths of a second since Jan 1, 1970. Developers often uses these items for uniqueness. The first 13 digits you can easily get with the standard C time structure. The last ten-thousandth you can likely leave static or replace it with a random digit from 1 to 9.

Post Extras: Print Post   Remind Me!   Notify Moderator  
LoadRunner421
Member


Reged: 05/06/11
Posts: 142
Re: Data need to be correlated but not in the response [Re: James Pulley]
      #719383 - 11/06/12 08:12 AM

Well that answers that. Thanks for info James. Good info to add to our memory banks.

Post Extras: Print Post   Remind Me!   Notify Moderator  
ptrussell_ncModerator
Super Member


Reged: 01/17/06
Posts: 1636
Loc: Charlotte, NC
Re: Data need to be correlated but not in the response [Re: James Pulley]
      #719384 - 11/06/12 08:13 AM

Quote:

"13516767347673" is a 14-digit time stamp for number of ten-thousandths of a second since Jan 1, 1970. ...




For more on this, search for 12345678 in this forum. I think I posted something about it. (Or maybe I just emailed some people.)

--------------------
Unless you are writing a compiler, strtok is NOT the answer.
See: http://www.sqaforums.com/showflat.php?Cat=0&Number=541641&Main=541641#542222

QAF is still an exercise in self-sufficiency! (Thank JB!)


Post Extras: Print Post   Remind Me!   Notify Moderator  
saharinivas
Member


Reged: 04/24/08
Posts: 199
Re: Data need to be correlated but not in the response [Re: ptrussell_nc]
      #719440 - 11/07/12 05:57 AM

Hi,

"web_save_timestamp_param" function in LR will help you to get 14 digit time stamp number which james mentioned in last post. You can directly use that fucntion and no need any c codings.

Regards,
Mahesh


Post Extras: Print Post   Remind Me!   Notify Moderator  
James PulleyModerator
Moderator


Reged: 08/01/01
Posts: 5551
Loc: NC
Re: Data need to be correlated but not in the response [Re: saharinivas]
      #719446 - 11/07/12 06:43 AM

That function will give you the 13 digits to the thousands, which is the standard UNIX time stamp, the number of thousands of a second since Jan 1 1970 (Epoch). The last digit you will need to manage yourself .

Post Extras: Print Post   Remind Me!   Notify Moderator  
LoadRunner421
Member


Reged: 05/06/11
Posts: 142
Re: Data need to be correlated but not in the response [Re: James Pulley]
      #719454 - 11/07/12 07:41 AM

Yeah I tried that function yesterday and noticed it only did 13. It's pretty simple to get the last digit though:

web_save_timestamp_param("tStamp", LAST );

lr_output_message(lr_eval_string("{tStamp}1"));


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 43 anonymous users are browsing this forum.

Moderator:  AJ, James Pulley, ptrussell_nc, JimHowell1970 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 4903

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5