UFT12.5 How to pass query parameters in REST API call
We are trying to run a test that passes query parameters to a REST API using the url similar to the example url listed in the Flights application: http://localhost:8000/HPFlights_REST/Flights?DepartureCity=Denver&ArrivalCity=London We need to be able to have the two parameters, DepartureCity and ArrivalCity set up so that we can drive them as parameters which can be run multiple times each time with a new data pair. The exaple in the tutorial doesn't seem to explain how to pass the parameters
You need to create the input parameters in the REST service method and then instruct UFT to use them in the relative URL of the method. For example, for the Flights application, you would create the service with URL: http://localhost:8000/HPFlights_REST/
Then a method named Flights with input parameters DepartureCity and ArrivalCity and relative URL:
The name of the method might vary in your system, please select the <Link to data source> button in the "Relative URL" field and then the <Custom Expression> button to create the necessary relative URL.