Highlighted
Absent Member.
Absent Member.
174 views

Load Testing in different environments

I have scripted in Test Environment.now i need to run those scripts in UAT environment.the only change is the URL.but when i try to replace the URL the scripts are not working.Protocol is Web(http/html).how can i use the same script by replacing the url and how could i check what needs to be replaced.
0 Likes
10 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Load Testing in different environments

That should be fine. I suspect there are few changes in application which you are not aware of. At which step it is failing and what error you are getting?
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Load Testing in different environments

When you change the URL u should be fine try to just change even for changing url use the following example

you created script in www.dev.com and you want to run them in www.qa.com then just change the replace dev with qa.
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Load Testing in different environments

Hi, found this script on the net which enables you to parrameterise URLs in your LR scripts and test various environments easily.

// DEFINE VARIABLES
char *appurl; // Variable To Hold URL Name

// START - SELECT ENVIRONMENT TO RUN LOADTEST AGAINST BY UNCOMMENTING THE CORRECT ENVIRONMENT

appurl = "ABC.com"; // TEST ENV #1
// appurl = "dev.ABC.com"; // DEV ENV #2
//appurl = "test.ABC.com"; // TEST ENV #3

// CONVERT URL TO PARAMETER TO USE IN URLS BELOW
lr_save_string(appurl,"p_Url");

// END - SELECT ENVIRONMENT TO RUN LOADTEST AGAINST BY UNCOMMENTING THE CORRECT ENVIRONMENT

web_url("ABC",
"URL=http://{p_Url}/default.aspx",
"TargetFrame=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);

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

Re: Load Testing in different environments

Hi, Have you replaced all the urls with that of UAT one. what is the error that was encountered?. one basic point is (may be you would have done this already) have to checked the whether the user ID and password (If any are used) have access to UAT Environment.

Regards,
Ravi
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Load Testing in different environments

This is still not working.when i replace the url i am getting an error message.
"Could not resolve address of host server27"
I even created a new script and copied the login part to the old one.but getting the same error message
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Load Testing in different environments

In my current environment at least we have different host names in the URL for each env. I paramterize the hostname and just change parameter files to run my scripts in a different test env. Our build process is consitent between the environments.

Can you ping "host server27" from the machine where you are running the script or nslookup? If DNS is not working for that hostname you may need to add it to your hosts file.

Since you can record the app I would imagine that is not the problem.

I would record the script exactly the same way in each enviornment and use wdiff to compare them to see what is different.

I have run into situations where the applications in each enviornment even though the same app were different and I had to maintain multiple script baselines.

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

Re: Load Testing in different environments

Can you post your edited script?
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Load Testing in different environments

Find attached both the old and new script.both of them go to the same authentication server.both of them are scripted from different application servers.
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Load Testing in different environments

I wonder... is this due to the fact that your UAT environment is using https:// as opposed to http:// ?
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Load Testing in different environments

Sorry, I finally took a look at what you attached, (I don't have WinRAR or a recent version of WinZip at work). It is impossible for me to tell what is going on by just reviewing your Action.c files. I would really need to view your scripts in VuGen after both have been played back with full logging.

General-->Log Check Enable logging, Always send messages, Extended log, Parameter substitution, and Data returned by server.

You should record the exact steps in your UAT environment and use WDiff to compare them to find the differences.

One other recommendation, in the future it might be best to record this application using a URL based script instead of HTML.

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