Forum Discussion

DLuks's avatar
DLuks
Contributor
15 years ago

TestSuite reference to Maven endpoint configuration

Hi,

I have a test suite that has a start up script and a tear down script. Within those two scripts, it makes a quick call to our servers to initialize a lucene core before the test cases start. We are using maven and the endpoint is set in the configuration.

Is there a way to reference the project endpoint from the testSuite startUp and tearDown scripts?


Example Startup:
import com.eviware.soapui.model.iface.*
import com.eviware.soapui.impl.wsdl.WsdlSubmitContext

Interface FFS = testSuite.project.interfaces["FFS"]
Operation op = FFS.getOperationByName("Core Admin")
Request req = op.getRequestByName("Create Core Request")
req.setPropertyValue("name", "assets-test_3")
req.setPropertyValue("dataDir", "data/assets-test_3")
req.setPropertyValue("instanceDir", "./")
Submit submit = req.submit(new WsdlSubmitContext(), false)
assert submit.getStatus() == Submit.Status.FINISHED


The example is missing the line req.setEndpoint("<<endPoint>>"), but I can't find a way to reference the endPoint implied by maven.

1 Reply

  • Also I see that Maven only sets the endpoint for all Test Requests and not Requests, should I just configure my script to be a test request?