REST API URL in Extension Tool
Comments
-
URL for what REST API? Where is the URL you are trying to get? In an environment variable?
0 -
the current URL I am hitting(in the request). I have to pass that to extension tool for validations of pagination.The URL is created taking host variables from environment and data from Data source.
0 -
As one possible option for you, you could chain an Extension Tool to your client's "Traffic Object" output then use a Groovy script like this:
import com.parasoft.api.* void test(Map input, ScriptingContext context) { Application.showMessage(input.get("End Point")) }
Otherwise, that ScriptingContext object passed to the script also has "getEnvironmentVariableValue" and "getValue" methods you can call to resolve environment variables and data source columns, in case you want to make your script build the same URL from variables and/or data source or data bank columns. Something like:
context.getEnvironmentVariableValue("BASEURL") + context.getEnvironmentVariableValue("PATH") + context.getValue("Generated Data Source", "column name")
0