Highlighted
Absent Member.
Absent Member.
1523 views

Timestamps

Hi,

 

I am  getting so many random numbers in my script as below.

 

web_submit_data("Mywebpage.do_6", 
        "Action={Enviornment}/pc/Mywebpage.do?ts=19355093", 
        "Method=POST", 
        "RecContentType=text/html", 
        "Referer={Enviornment}/pc/Mywebpage.do?ts=98991789", 
        "Snapshot=t9.inf", 
        "Mode=HTML", 
        ITEMDATA, 
        "Name=TabBar:PolicyTab:PolicyTab_SubmissionNumberSearchItem", "Value=", ENDITEM,

 

I am not sure but I think these are timestamps(bcoz of 'ts') and there are so many different values throughout the script.

The script is working fine with these original recorded values .

 

My question is do I need to correalte or make these values dynamically appear by any other means?

 

0 Likes
5 Replies
Highlighted
Valued Contributor.
Valued Contributor.

Hi,

 

Pls check with generation log whether its related to time .Also, make sure that, only last 3 or 4 digits only changes  in the timestamp number. if each number is different, then its not a timestamp. If you are sure it is a timestamp , you can use web_save_timestamp_param function before each hits where timestamp value occurs.

 

Thanks

0 Likes
Highlighted
Absent Member.
Absent Member.

Thnks for the response.

 

Here all digits are different and not only the last four.So we cannot use 'web_save_timestamp_param()'

 

I was considering it as something like time stamp because of the word 'ts' before it,

 

The script is working fine without correlating it or even when i am deleting this number.

But as a general practice we should get rid of any kind of dynamic values from script.

 

So is correlation the only solution or there is any other means to make it dynamically appear?

 

 

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

        "Action={Enviornment}/pc/Mywebpage.do?ts=19355093", 
        "Referer={Enviornment}/pc/Mywebpage.do?ts=98991789",

 

 

What are those numbers used for in the application? 

 

Once you know what the numbers are used for then you will know if you need to correlate them or not. So instead of playing a  guessing game why not just go and get the information? (Ask the developers)

Highlighted
Absent Member.
Absent Member.

What you have in your sample code is a typical way web based applications pass variables from page to page, but LoadRunner is only telling you that the page you requested was present. So "ts" is the variable throughout your application being tested and each of the numbers are the values being used on those pages. Your developers should be able to explain how they are used. If they're dynamic you'll need to correllate them.
You can't trust LR to send back any errors or failures for invalid URL variables unless you have error checking in the script code. Since Mywebpage.do is a file and does respond to a request to that file LR will report it as success. The page may be working as you expect or just be one big error message, but unless your script is specifically looking for a valid response you won't know.

0 Likes
Highlighted
New Member.

I agree with LoadRunner421 - just ask the developers.

Sometimes timestamps may represent the current time declared by the browser, and other times they may represent an event that occured on the server side.

So using LR API to save the current timestamp will not always be the correct behavior.

Oded Keret
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.