Seed
16 years agoOccasional Contributor
HTTP Endpoint
I created an HTTP Request step that would tickle a URL with a GET request to trigger another part of our system as part of our test. The problem is I don't want the endpoint to be overwritten as with our smoke tests we get this value from the environment.
For example if we build our app and deploy to server called juice.soap.com the endpoint gets specified as juice.soap.com from the env in which we're running a CI test.
env var API_ENDPOINT=juice.soap.com:8118
flip it to a param in a kickoff scripts as apiend then call it
/testrunner.sh -j -S -e$apiend
The problem is in the HTTP step I don't want to hit the endpoint, I want to make a hit to an external URL to trigger some data processing, like meat.soapui.com after certain events get kicked off. Problem is in our smoke tests this gets overwritten with the endpoint. Kind of sucks and didn't expect this to be the behavior. I thought an HTTP call would be to whatever you specify. I am not interested in hitting an API endpoint here. I want to hit meat and pass the parameters.
http://juice.soapui.com:8118
What I have to do now is use groovy script I guess and make a curl request but I am having trouble figuring out the syntax for:
http://meat.soapui.com/d?${#Project#cHash}/${#Project#uHash3}
When I put it in a curl call:
def unsubs = "curl http://meat.soapui.com/d?${#Project#cHash}/${#Project#uHash3}" .execute()
I get an exception with the # so I think I have to do some special property handoffs.
How do I do that so that I can specify the properties in a def task in groovy?
For example if we build our app and deploy to server called juice.soap.com the endpoint gets specified as juice.soap.com from the env in which we're running a CI test.
env var API_ENDPOINT=juice.soap.com:8118
flip it to a param in a kickoff scripts as apiend then call it
/testrunner.sh -j -S -e$apiend
The problem is in the HTTP step I don't want to hit the endpoint, I want to make a hit to an external URL to trigger some data processing, like meat.soapui.com after certain events get kicked off. Problem is in our smoke tests this gets overwritten with the endpoint. Kind of sucks and didn't expect this to be the behavior. I thought an HTTP call would be to whatever you specify. I am not interested in hitting an API endpoint here. I want to hit meat and pass the parameters.
What I have to do now is use groovy script I guess and make a curl request but I am having trouble figuring out the syntax for:
http://meat.soapui.com/d?${#Project#cHash}/${#Project#uHash3}
When I put it in a curl call:
def unsubs = "curl http://meat.soapui.com/d?${#Project#cHash}/${#Project#uHash3}" .execute()
I get an exception with the # so I think I have to do some special property handoffs.
How do I do that so that I can specify the properties in a def task in groovy?