I have created a SoapUI project that connects with a message queue and sends a JMS message onto it. In order to connect with the MQ, I have used the HERMES tool that SoapUI provides. Currently I am using Hermes v1.14.
I've created the required session and the appropriate queues at Hermes' end and sent the JMS message after following the steps as shown here : https://www.soapui.org/documentation/jms/config.html, https://www.soapui.org/jms/working-with-jms-messages.html
This all works fine.
Now I am trying to incorporate this SOAPUI project into a Java project in which I will provide the project XML and run all the required Test Cases. I am unable to create the HERMES session and queues, etc. via Java code. Below are some code snippets from the class. Am I on the right path? Looking for some help to configure this.
TestRunner runner = null;
SoapUI.setSoapUICore(new StandaloneSoapUICore(true));
WsdlProject project = new WsdlProject("C:\\My Directory\\CustomerTest-soapui-project.xml");
List<TestSuite> suiteList = project.getTestSuiteList();
String defaultHermesJMSPath= HermesUtils.defaultHermesJMSPath();
System.out.println("defaultHermesJMSPath- "+defaultHermesJMSPath);
String soapUiHome = System.getProperty("soapui.home");
System.out.println("soapUiHome - "+soapUiHome);
//System.setProperty("soapui.home", "C:\\Program Files\\SmartBear\\SoapUI-5.2.1\\bin");
TestRunner runner = project.getTestSuiteByName("Private Individual").getTestCaseByName(
"TEST CASE CONTAINING GROOVY SCRIPT TEST STEPTHAT CONNECTS TO HERMES").run
(new PropertiesMap(), false);
Output:
defaultHermesJMSPath - null
soapuiHome - null
P.S. I have included a number of JARs for this which are :
Any help would be appreciated.