Contributions
Re: Invoke a test step from java
Thanks for the reply kamahade. I have obtained TestCaseRunner using SoapUITestCaseRunner as below: SoapUITestCaseRunner runner = new SoapUITestCaseRunner(); runner.setProjectFile(projectPath); But my question is how do I get the current TestCaseRunContext, which allows me to run a particular test step of soapUI project XML stored at <projectPath>. Or else let me know if there is way of directly running a particular Test Step of a soapUI project XML using runner object, in java. Thanks, Devakara.3.7KViews0likes0CommentsInvoke a test step from java
Hi Ole, How do we invoke a particular Test Step of a soapUI project XML from java? I have learnt how a Test Case needs to be invoked from java. But couldn't figure out how to get hold of TestCaseRunContext, for running a particular test step. Please look into this and let me know the solution. Thanks, Devakara.4.2KViews0likes4CommentsRe: NoClassDefFoundError ModelItemConfig
I tried adding jars present in soapUI installation’s lib one by one to build path of the Java class. Below is the list I tried to add manually one after the other. <classpathentry kind="lib" path="WebContent/WEB-INF/lib/portlet-api-1.0.jar"/> <classpathentry kind="lib" path="WebContent/WEB-INF/lib/soapui-3.0.1.jar"/> <classpathentry kind="lib" path="WebContent/WEB-INF/lib/xmlpublic-2.4.0.jar"/> <classpathentry kind="lib" path="WebContent/WEB-INF/lib/soapui-xmlbeans-3.0.1.jar"/> <classpathentry kind="lib" path="WebContent/WEB-INF/lib/log4j-1.2.14.jar"/> <classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-httpclient-3.1.jar"/> <classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-cli-1.0.jar"/> <classpathentry kind="lib" path="WebContent/WEB-INF/lib/xbean-fixed-2.4.0.jar"/> <classpathentry kind="lib" path="WebContent/WEB-INF/lib/xbean_xpath-2.4.0.jar"/> <classpathentry kind="lib" path="WebContent/WEB-INF/lib/groovy-all-1.6.4.jar"/> Even with this list, the class was throwing exceptions when executed. Finally I decided to add all the jars present in the soapUI lib to the build path of the project. After this the class was executed without any errors. I am not sure yet, whether we require all of those jars for initializing the WsdlProject. [WsdlProject project = new WsdlProject(projectPath);] But with all of lib's jars, there should not be any runtime errors. However if anyone knows the exhaustive list of jars required please reply. I shall be writing a detailed post about this in my blog. Thanks, Devakara.1.1KViews0likes0CommentsNoClassDefFoundError ModelItemConfig
Hi, I am trying to run a particular test case in soapUI project XML, using simple/standalone Java class. Code I used is: public class RunSoapUIProject { public static void main(String[] args) { try { String projectPath = "C:\\soap\\LP-soapui-project.xml"; WsdlProject project = new WsdlProject(projectPath); List<TestSuite> testSuites = project.getTestSuiteList(); System.out.println(testSuites.toString()); // some useful code here } catch (Exception e) { e.printStackTrace(); } } This is throwing an Exception: java.lang.NoClassDefFoundError, when executing/initializing wsdl project. (There are no compilation errors) I have included soapui-3.0.1.jar and xmlpublic-2.4.0.jar in build path of this java project. Below is the exact exception message: Exception in thread "main" java.lang.NoClassDefFoundError: com/eviware/soapui/config/ModelItemConfig Could anyone look into this and let me know what is missing in my attempt, or should I include any other jar(s). Thanks, Devakara.2.2KViews0likes1CommentRe: How to declare namespace using groovy script
Hi Srinivas, You can refer to http://groovyinsoapui.wordpress.com/2008/10/03/using-xpath-assertion-in-soap-ui/ where I have explained how to use XPath match assertion in SOAP UI. Please get back if more help is needed. Devakara, http://groovyinsoapui.wordpress.com3.1KViews0likes0CommentsRe: load test with SOAP request having variable parameter
Thanks Ole, I am now using the SOAP UI 2.5 beta-1 version. I just included the logic for fetching the current timestamp to serve the purpose of an UID, and its working great! (I mean to say each request that hits my web service is carrying a unique refId as required to invoke the service) Thanks again, Devakara, www.groovyinsoapui.wordpress.com1.1KViews0likes0Commentsload test with SOAP request having variable parameter
Hi All, I have a problem in load tesing a small webservice, called GenReportService. There is a node called in the SOAP request that is sent to GenReportService. And the service responds only to unique refIds, basically the node carries int values. When I select some Load Test Strategy with say 5 threads,50 Total runs on Simple Strategy; the requirement is every SOAP request that hits the service should have a unique value in that node. Because, as said the service responds only to unique refIds I tried including some property step before the Request step while load testing, but i see that steps are not getting executed parallely. Please help me in load testing this WS for which the request should carry a variable parameter (or any other solution to break this out!) Thanks in advance for any help... Devakara, www.groovyinsoapui.wordpress.com2.7KViews0likes4Comments