Navigate back to your operation’s ‘General’ area and for the Endpoint Address click on the ‘Link to data source”

In the Select Link Source to ‘Endpoint Address’, point to the ‘EndPoint’ input property we just created

Run the script and in the Run dialog click on the Input Parameters tab to set the EndPoint:

How to read the endpoint from a file

Another approach is the write out the endpoint to a local file and when the script runs read in the value from the file.

Add a ‘Read from File’ activity into the main canvas area

Under the Read from File’s property sheet set the ‘File path’ to the file that contains the endpoint info:

Navigate back to your operation’s ‘General’ area and for the Endpoint Address click on the ‘Link to data source”

In the Select Link Source to ‘Endpoint Address’ and point to the read from file’s ‘Content’ output value

Run the script and it should read the endpoint from the file

That’s it

Cool! You should now be able to run the same Service Test script against multiple environments.

5 comments

Sachin Walukar - July 19, 2012

Hi, Actually this solution doesnt work, as here we have to change WSA Addressing(Security settings) as per the endpoint. So if we change endpoint from text file, we can link them to endpont from General tab for Operation but there is no any way to link WSA Addressing.

Leave a reply:

Joe, I’m curious how we might be able to use custom code to accomplish something similar by reading from a test resource in QC. I have found some limitations with the way QC / ST can accept data when using Business Components and Business Process Tests. For example you can only link to a single data sheet which means that if I want to feed values in from QC via a data sheet I have to have a single data sheet that contains all my test data AND the endpoint, likely meaning the endpoint is repeated on every line of the tests data. How can I setup a test to obtain the endpoint from a single location in QC (test resources ideally) but also accept a data sheet full of input data?

Leave a reply:

bhill » I just dbl checked in UFT 11.5. I drag a web service’s operation to the main canvas area. Click on that operation. Click on it’s Properties>General section. Click on Transport>Choice HTTP and have an endpoint address. Can you dbl check and let me know what you see? Thanks

Copyright text 2017 by Joe Colantonio/TestTalks br> br>Disclaimer All the contents of the Blog, EXCEPT FOR COMMENTS, constitute the opinion of the Author, and the Author alone; they do not represent the views and opinions of the Author’s employers, supervisors, nor do they represent the view of organizations, businesses or institutions the Author is a part of. Privacy Policy
- Designed by Thrive
Themes | Powered by WordPress