Highlighted
Absent Member.. Absent Member..
Absent Member..
195 views

Fail on Error?

Hello Experts

 

I am trying to record a script  using HTTP/HTML for a testing application which is a XML file with status ok.I wanna make the script in such a way that if the status changes to error then the script should fail.

 

I know if i give a text check on OK  and if it turns something else it will change but the xml file has Ok in four different places.So i wanna see if any of them changes to error then fail?

 

Anybody know how would i do that?

0 Likes
2 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Fail on Error?

Why dont you use lr_xml_* functions to verify the corresponding text in the specific node of XML string?

 

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Fail on Error?

As Madan mentioned there is a function called lr_xml_get_values to get a particular value from that xml, if you get the right value it will continue but if you get a different one you can use lr_fail and then make the script stop with lr_exit. You can check the LR Online Function Reference when you press F1 in Vugen for details on these functions and examples on each one.

 

Regards,

Mario

HP LR/PC Support

If you are customer you can try posting on our internal forums for more personalized support.

LoadRunner:
http://h30499.www3.hp.com/t5/LoadRunner-Support-Customer/bd-p/loadrunner-support-customer-forum

Performance Center:
http://h30499.www3.hp.com/t5/Performance-Center-Support/bd-p/performance-center-support-customer

How to:
http://www.youtube.com/watch?v=4ChlysWupWM

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
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.