Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Highlighted
NarasimhaReddy Valued Contributor.
Valued Contributor.
1965 views

How to set HTTPS status code 400 to 200 in Loadrunner

Hi All,

I would like to set my https status code as 400 to 200 and I need make pass my request in the script.

Is there any possiblity to change status codes in LR during script execution?

 

Thanks & Regards,

NarsimhaReddy.T

0 Likes
6 Replies
AvniLior Acclaimed Contributor.
Acclaimed Contributor.

Re: How to set HTTPS status code 400 to 200 in Loadrunner

Hi

Not sure I understood you correctly - you are receiving a 400 status code (bad request in HTTP), and you want to modify it to 200 (OK response)?

what is the point? shouldn't you first treat the problem that is obviously there?

I suggest a deeper analysis of your run, undersand why you are receiving the 400 response and continue from there.

Good Luck,

Lior

0 Likes
OlaBerggren Acclaimed Contributor.
Acclaimed Contributor.

Re: How to set HTTPS status code 400 to 200 in Loadrunner

Hi

First of all, this is not possible to my knowledge.

Secondly, why would you want to do such a thing?
HTTP 4xx indicates an error of some kind and you should not pretend that it isn't. If you can explain that it is expected and not should be considered an error, then do so in your report. But to hide it is not a good option. Of course you will be able to fix this with some SQL to the results, but then you also could tweak the responsetimes and remove the highest ones while you are at it.

br /ola


Please mark post as solved if your problems or questions is/are resolved.
If this post was valuable to you, please consider kudo it.

.
NarasimhaReddy Valued Contributor.
Valued Contributor.

Re: How to set HTTPS status code 400 to 200 in Loadrunner

Hi

It is a intended behaviour of my application, when I am recording my application I am getting 404 request with some authenticated values, I need to capture that and send it back to my server then only it will accept my next request.

i knew 400 is a bad request but it's a valid request in my case and I don't want to see any fail messages in my test execution.

Could you please let me know if you have any solution for this.

 

Thanks & Regards,

NarasimhaReddy.T

0 Likes
AvniLior Acclaimed Contributor.
Acclaimed Contributor.

Re: How to set HTTPS status code 400 to 200 in Loadrunner

Hi

Now that you added this explanation, the situation is clearer.

I would suggest than to capture any 400 statements and to mark them as "pass".

You will need to write a custom code for this with "if / else" statements and you need to be careful to not cancel out legitimate errors.

you can, for example, use the "web_reg_find", let it look for "error" and conclude it with "fail=Found".

Good Luck,

Lior

RaghulMurugadas Honored Contributor.
Honored Contributor.

Re: How to set HTTPS status code 400 to 200 in Loadrunner

Hi,

Use http error as warning available in run time settings....preference

Thanks
Raghul
Pratim C Regular Contributor.
Regular Contributor.

Re: How to set HTTPS status code 400 to 200 in Loadrunner

Thanks for the solution! It works for me.

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.