15 years ago
service end point used in http request test step not used
Hi,
I have a problem when using a test step of type http request. The version of soap UI that we use is 3.5.1.
The test is as follows:
1) Call a rest service, the response is a xml, the xml contains an url
<axml>
<url>http://some.url/that/points/to/afile.html</url>
<axml>
2) Use a property transfer to set a property myTestUrl=http://some.url/that/points/to/afile.html3
3) Execute a http request test step (GET), the endpoint used is ${#myTestUrl} (i.e. http://some.url/that/points/to/afile.html)
When doing this in the soapUI GUI everthing works as it supposed to do. However when running soapUI from maven we have a problem.
Our tests are executed towards different test machines, some of the machines are accessed through http (http://atestserver) other are accessed with https (https://anothertestserver). We use AbstractSoapUiTest.setEndpoint with different endpoints depending on the environment the test should be executed against.
The problem is that when AbstractSoapUiTest.setEndpoint is used it does not matter what value ${#myTestUrl} is allocated, the endpoint used when the test is executed is the one set by AbstractSoapUiTest.setEndpoint (for example http://atestserver). This means that I can't call my rest service, extract an url and then use it in the following test step.
My current solution is not to use a test request of the type http request, instead I have changed so that a rest test step is used with a service defined like this: "/that/points/to/afile.html", the result of this in combination with AbstractSoapUiTest.setEndpoint is something like http://atestserver/that/points/to/afile.html. I would prefere not to use this work around, the url received in step 1 in my test case is generated, if I test using a hard coded url my test is less meaningful.
To me this feels like a bug.
Is there a work around for this, or is my setup in error?
I have a problem when using a test step of type http request. The version of soap UI that we use is 3.5.1.
The test is as follows:
1) Call a rest service, the response is a xml, the xml contains an url
<axml>
<url>http://some.url/that/points/to/afile.html</url>
<axml>
2) Use a property transfer to set a property myTestUrl=http://some.url/that/points/to/afile.html3
3) Execute a http request test step (GET), the endpoint used is ${#myTestUrl} (i.e. http://some.url/that/points/to/afile.html)
When doing this in the soapUI GUI everthing works as it supposed to do. However when running soapUI from maven we have a problem.
Our tests are executed towards different test machines, some of the machines are accessed through http (http://atestserver) other are accessed with https (https://anothertestserver). We use AbstractSoapUiTest.setEndpoint with different endpoints depending on the environment the test should be executed against.
The problem is that when AbstractSoapUiTest.setEndpoint is used it does not matter what value ${#myTestUrl} is allocated, the endpoint used when the test is executed is the one set by AbstractSoapUiTest.setEndpoint (for example http://atestserver). This means that I can't call my rest service, extract an url and then use it in the following test step.
My current solution is not to use a test request of the type http request, instead I have changed so that a rest test step is used with a service defined like this: "/that/points/to/afile.html", the result of this in combination with AbstractSoapUiTest.setEndpoint is something like http://atestserver/that/points/to/afile.html. I would prefere not to use this work around, the url received in step 1 in my test case is generated, if I test using a hard coded url my test is less meaningful.
To me this feels like a bug.
Is there a work around for this, or is my setup in error?