Forum Discussion

Narasimharao's avatar
Narasimharao
Contributor
15 years ago

Override jms end point during execution

Hello

Please suggest ways of everriding the end point of a soapui project at runtime. Here my scenario

Created a project with test suite and testcases and tested with endpoint1 (JMS end point).
When we run this project using command(on a build server) i should be able to send some parameters to command and the end point should be changed based on the parameters (the parameters can be configured in a properties file and we can feed the name of the properties file to command)

Please let me know how the end point can be parameterized while developing test case.(the end point is selected using the dropdown available in the request step as specified in http://soapui.org/JMS/working-with-jms-messages.html)

Thanks,
Narasimharao

1 Reply

  • nmrao's avatar
    nmrao
    Community Hero

    This is one of the way to have the dynamic jms details.

     

    1. In the hermes-config.xml, have place holder for jms server url.And this url can be associated with session name.
    2. Have project property for JMS_SERVER_URL which you can over write during invoking the testrunner along with property. Or you may use property file and load this file, however you wish.
    3. As part of load script at project level, update the place holder values in hermes-config.xml using the property value.

    And the trick is to use the end point also as property like SERVICE1_END_POINT. For eg if it is http then assign value of SERVICE1_END_POINT to http://yourserver.com/service1 and if it is jms, assign value of jms://SESSION_NAME::queue_QUEUE_NAME_TO_SEND::queue_QUEUE_NAME_TO_RECIEVE. Of course, you can have a property to choose if it is jms or http. This can also be done as part of load script of the project. So, always your endpoint would be ${#Project#sERVICE1_END_POINT} and value can be derived based on user input for protocol type.