Highlighted
testbravo Super Contributor.
Super Contributor.
2119 views

Negative Testing HTTP Status-Code=500 (Internal Server Error) is expected Error in vugen scriptiong

Hi Team,

 

We have the requirement of negative testing as HTTP Status-Code=500 is expected response but currently script get failed for 500 response.

We are using http/html protocol .Let us know is there any way to do same in vugen scripting to expect the 500 response.

 

Regards

Prashant

0 Likes
3 Replies
AvniLior Acclaimed Contributor.
Acclaimed Contributor.

Re: Negative Testing HTTP Status-Code=500 (Internal Server Error) is expected Error in vugen scripti

Hi

You can choose to mark HTTP errors as warnings using the run time settings

Capture.PNG

Note - it is a risky business to do so as you may get quite a few "false positives". be sure to monitor it correctly and perhaps add some "if" statements to make sure you ignore the "good" error 500 and don't dismiss real error messages.

Good Luck,

Lior

0 Likes
testbravo Super Contributor.
Super Contributor.

Re: Negative Testing HTTP Status-Code=500 (Internal Server Error) is expected Error in vugen scripti

Hi Lior,

The requirement is alert need to be triggered for other than 500 error response code.

As per my understanding in below condition all the HTTP errro are warning and our requirement is not fullfilled.

Regards

Prashant DOke

 

 

0 Likes
AvniLior Acclaimed Contributor.
Acclaimed Contributor.

Re: Negative Testing HTTP Status-Code=500 (Internal Server Error) is expected Error in vugen scripti

Hi

Than you'll need to add custom code to your script, identifying that an error 500 not be recognized as an error.

you're basic "if / else" should do it.

Good Luck,

Lior

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.