Contributions
Randomly getting "TestCase failed [TestCase timed out]"
a test that was running without problems a week ago now starts throwing TestCase failed becouse of a testcase timed out, and it happens on different steps. any solution for this? Thanks14 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.2KViews0likes3CommentsRe: Issue with Customizing JUnit Reports when using Excel Dataso
I don't think your fix will work correctly because you have this in the SoapUITestCaseRunner class public void setJUnitReport(boolean junitReport) { this.junitReport = junitReport; if(junitReport) reportCollector = new JUnitReportCollector(); } So i) When the setJUnitReport(true) gets called, the reportCollector will become the default one which is not the behavior we want ii) Once i) is taken care of, can you also make sure that the same custom reportCollector gets used all through the execution. Currently I have a feeling that it is only using the custom reportCollector for the first row of data and then going back to the default JUnitReportCollector (this is my guess based on the behavior that I am seeing). Would apprecatiate your comments/fixes for my concerns above. Thanks -- Sang14 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.1KViews0likes0CommentsIssue with Customizing JUnit Reports when using Excel Dataso
I am running a testcase which loads data from an excel sheet and runs through them (using the DataSource Loop step). When we run this using maven, we want the Junit reports generated to not just say whether the testcase passed or failed, but actually give us the row information (from the excel spreadsheet) that passed or failed (also print the data and assertion from that row in excel ). To achieve this, I wrote a custom JUnitReportCollector (and override the afterStep method) public class ICJUnitReportCollector extends JUnitReportCollector { public void afterStep(TestCaseRunner testRunner, TestCaseRunContext runContext, TestStepResult result) { TestStep currentStep = result.getTestStep(); WsdlDataSourceTestStep wsdlDataSourceTestStep = null; if (currentStep instanceof WsdlDataSourceTestStep){ wsdlDataSourceTestStep = (WsdlDataSourceTestStep) currentStep; _currentRow = wsdlDataSourceTestStep.getCurrentRow(); SoapUI.log.info("Debug: wsdlDataSourceTestStep - current row " + _currentRow); Map wsdlDataSourceTestStepProperties = wsdlDataSourceTestStep.getProperties(); Iterator iter = wsdlDataSourceTestStepProperties.entrySet().iterator(); while (iter.hasNext()){ Map.Entry entry = (Map.Entry) iter.next(); SoapUI.log.info("Debug: wsdlDataSourceTestStep - property name " + entry.getKey() + " with value " + ((TestStepProperty)entry.getValue()).getValue() ); } } \\\ } } My issue is this: i) The afterStep gets called only once even though there are multiple rows of data in the excel spreadsheet. I would expect this to be called for every row of data. Is my understanding correct? Is there some other way I can do the acheive the same thing. ii) To even get this far, I had to set the reportcollector (on my custom extension to SoapUIProTestCaseRunner) using reflection (because the reportcollector is a private field on SoapUIProTestCaseRunner ). Do you provide extension points for us to do this directly from the API. Please contact me for any questions/information. -- Sang14 years agoPlace ReadyAPI QuestionsReadyAPI Questions5.2KViews0likes4CommentsRe: Problem invoking the DemoRequestFilter
Changed the Filter code to this and now it is working fine . package soapui.demo; import com.eviware.soapui.impl.wsdl.WsdlRequest; import com.eviware.soapui.impl.wsdl.submit.RequestFilter; import com.eviware.soapui.impl.wsdl.submit.transports.http.BaseHttpRequestTransport; import com.eviware.soapui.model.iface.Request; import com.eviware.soapui.model.iface.Response; import com.eviware.soapui.model.iface.SubmitContext; import com.eviware.soapui.support.xml.XmlUtils; import com.eviware.soapui.SoapUI; public class DemoRequestFilter implements RequestFilter { @Override public void afterRequest(SubmitContext arg0, Request arg1) { // TODO Auto-generated method stub } public void afterRequest( SubmitContext context, Response response ) {} @Override public void filterRequest( SubmitContext context, Request wsdlRequest ) { System.out.println( "****running demofilter******" ); SoapUI.log.info( "****running demofilter******" ); } } Thanks for your help14 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.1KViews0likes0CommentsRe: Problem invoking the DemoRequestFilter
My DemoRequestFilter code is as below. package soapui.demo; import com.eviware.soapui.impl.wsdl.WsdlRequest; import com.eviware.soapui.impl.wsdl.submit.RequestFilter; import com.eviware.soapui.impl.wsdl.submit.transports.http.BaseHttpRequestTransport; import com.eviware.soapui.model.iface.Request; import com.eviware.soapui.model.iface.Response; import com.eviware.soapui.model.iface.SubmitContext; import com.eviware.soapui.support.xml.XmlUtils; import com.eviware.soapui.SoapUI; public class DemoRequestFilter implements RequestFilter { @Override public void afterRequest(SubmitContext arg0, Request arg1) { // TODO Auto-generated method stub } @Override public void filterRequest(SubmitContext arg0, Request arg1) { // TODO Auto-generated method stub } public void afterRequest( SubmitContext context, Response response ) {} public void filterRequest( SubmitContext context, WsdlRequest wsdlRequest ) { log.info "In demo request filter" System.out.println( "****running demofilter******" ); SoapUI.log.info( "****running demofilter******" ); } } I still dont see "****running demofilter******" in the soapui logs.14 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.1KViews0likes0CommentsRe: Problem invoking the DemoRequestFilter
Iam using the following cofiguration in the demo-listeners.xml . <tns:listener id="DemoListener" listenerClass="com.eviware.soapui.support.scripting.listeners.ScriptRequestFilter" groovyClass="soapui.demo.DemoRequestFilter" listenerInterface="com.eviware.soapui.impl.wsdl.submit.RequestFilter"/> , and I see that the listener class is being registered on the stratup. Please find the corresponding log below. 2010-06-28 13:21:22,500 INFO [DefaultSoapUICore] initialized soapui-settings from [C:\Documents and Settings\rci1\soapui-settings.xml] 2010-06-28 13:21:23,125 INFO [SoapUIProGroovyScriptEngineFactory] Setting Script Library to [C:\Program Files\eviware\soapUI-Pro-3.5.1\bin\scripts] 2010-06-28 13:21:23,125 INFO [DefaultSoapUICore] Adding listeners from [C:\Program Files\eviware\soapUI-Pro-3.5.1\bin\listeners\demo-listeners.xml] 2010-06-28 13:21:23,140 INFO [DefaultSoapUICore] Adding listener [class com.eviware.soapui.support.scripting.listeners.ScriptRequestFilter] 2010-06-28 13:21:24,734 INFO [WorkspaceImpl] Loading workspace from [C:\Documents and Settings\rci1\default-soapui-workspace.xml] 2010-06-28 13:21:26,453 INFO [WsdlProject] Loaded project from [file:C:/_home/application/hybrid/trunk/testing/hybrid-sts-testing/src/test/resources/hybrid] 2010-06-28 13:21:27,828 INFO [WsdlProject] Loaded project from [file:C:/_home/application/commercial/testing/commercial-sts-testing/src/test/resources/commercial-sts-testing] 2010-06-28 13:21:28,609 INFO [SoapUI] Used java version: 1.6.0_18 2010-06-28 13:21:30,093 INFO [DefaultSoapUICore] Adding actions from [C:\Program Files\eviware\soapUI-Pro-3.5.1\bin\actions\demo-actions.xml] 2010-06-28 13:21:41,390 INFO [SchemaUtils] Added default schema from file:/C:/Program%20Files/eviware/soapUI-Pro-3.5.1/lib/soapui-3.5.1.jar!/com/eviware/soapui/resources/xsds/xop.xsd with targetNamespace http://www.w3.org/2004/08/xop/include 2010-06-28 13:21:41,421 INFO [SchemaUtils] Added default schema from file:/C:/Program%20Files/eviware/soapUI-Pro-3.5.1/lib/soapui-3.5.1.jar!/com/eviware/soapui/resources/xsds/XMLSchema.xsd with targetNamespace http://www.w3.org/2001/XMLSchema 2010-06-28 13:21:41,421 INFO [SchemaUtils] Added default schema from file:/C:/Program%20Files/eviware/soapUI-Pro-3.5.1/lib/soapui-3.5.1.jar!/com/eviware/soapui/resources/xsds/xml.xsd with targetNamespace http://www.w3.org/XML/1998/namespace 2010-06-28 13:21:41,421 INFO [SchemaUtils] Added default schema from file:/C:/Program%20Files/eviware/soapUI-Pro-3.5.1/lib/soapui-3.5.1.jar!/com/eviware/soapui/resources/xsds/swaref.xsd with targetNamespace http://ws-i.org/profiles/basic/1.1/xsd 2010-06-28 13:21:41,421 INFO [SchemaUtils] Added default schema from file:/C:/Program%20Files/eviware/soapUI-Pro-3.5.1/lib/soapui-3.5.1.jar!/com/eviware/soapui/resources/xsds/xmime200505.xsd with targetNamespace http://www.w3.org/2005/05/xmlmime I see that the listernerclassis being added and I dotn see any error logs. Why is it not able to invoke the listenerclass?? Really appreciate your help!!!14 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.1KViews0likes0CommentsRe: Problem invoking the DemoRequestFilter
I Replaced the listener configuration in the demo-listener.xml with the following config <tns:listener id="DemoListener" listenerClass="com.eviware.soapui.support.scripting.listeners.ScriptRequestFilter" groovyClass="soapui.demo.DemoRequestFilter" listenerInterface="com.eviware.soapui.impl.wsdl.submit.RequestFilter"/> , and my DemorequestFilter.groovy class in the folder \soapUI-Pro-3.5.1\bin\scripts\soapui\demo is as below . package soapui.demo; import com.eviware.soapui.impl.wsdl.WsdlRequest; import com.eviware.soapui.impl.wsdl.submit.RequestFilter; import com.eviware.soapui.impl.wsdl.submit.transports.http.BaseHttpRequestTransport; import com.eviware.soapui.model.iface.Request; import com.eviware.soapui.model.iface.Response; import com.eviware.soapui.model.iface.SubmitContext; import com.eviware.soapui.support.xml.XmlUtils; public class DemoRequestFilter implements RequestFilter { @Override public void afterRequest(SubmitContext arg0, Request arg1) { // TODO Auto-generated method stub } @Override public void filterRequest(SubmitContext arg0, Request arg1) { // TODO Auto-generated method stub } public void afterRequest( SubmitContext context, Response response ) {} public void filterRequest( SubmitContext context, WsdlRequest wsdlRequest ) { log.info "In demo request filter" System.out.println( "****running demofilter******" ); } } My DemoRequestFilter class is not getting invoked, I dont see the "In demo request filter" message in my soapui.log. Any insights please. Thanks in advance!!!14 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.1KViews0likes0CommentsProblem invoking the DemoRequestFilter
Hi, Iam trying to modify my request before I post it to a service. Iam using a RequestFilter, the script of which is as shown below . package soapui.demo; import java.io.IOException; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.traversal.DocumentTraversal; import org.w3c.dom.traversal.NodeFilter; import org.w3c.dom.traversal.NodeIterator; import com.eviware.soapui.impl.wsdl.WsdlRequest; import com.eviware.soapui.impl.wsdl.submit.RequestFilter; import com.eviware.soapui.impl.wsdl.submit.transports.http.BaseHttpRequestTransport; import com.eviware.soapui.model.iface.Request; import com.eviware.soapui.model.iface.Response; import com.eviware.soapui.model.iface.SubmitContext; import com.eviware.soapui.support.xml.XmlUtils; public class DemoRequestFilter implements RequestFilter { @Override public void afterRequest(SubmitContext arg0, Request arg1) { // TODO Auto-generated method stub } @Override public void filterRequest(SubmitContext arg0, Request arg1) { // TODO Auto-generated method stub } public void afterRequest( SubmitContext context, Response response ) {} public void filterRequest( SubmitContext context, WsdlRequest wsdlRequest ) throws IOException { String content = (String) context.getProperty( BaseHttpRequestTransport.REQUEST_CONTENT ); if( content == null ) { System.err.println( "Missing request content in context, skipping demofilter" ); } else { System.out.println( "****running demofilter******" ); } } } I placed the DemoRequestFilter.groovy file in the \soapUI-Pro-3.5.1\bin\scripts\soapui\demo folder. and then I added a Tns listener to the demo-listeners.xml file in \soapUI-Pro-3.5.1\bin\listeners like this : <tns:listener id="DemoListener" listenerClass="soapui.demo.DemoRequestFilter" listenerInterface="com.eviware.soapui.impl.wsdl.submit.RequestFilter" /> . I was expecting to see the system outs in my soapui logs, which Iam not. The Demo request filter isnot being invoked. Does any one has more insights into this. Can some one please help me with this. Thanks in advance14 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.7KViews0likes6CommentsNeed to delete datasource properties via groovy
but im receiving a class cast exception List<com.eviware.soapui.model.testsuite.TestProperty> previousProperties = (ArrayList<com.eviware.soapui.model.testsuite.TestProperty>)testRunner.testCase.testSteps['Spreadsheet'].getPropertyList(); for(int j=0; j<previousProperties.size(); j++) { String propertyName = previousProperties.get(j).getName(); testRunner.testCase.testSteps['Spreadsheet'].removeProperty(propertyName); } can you help us guys?14 years agoPlace ReadyAPI QuestionsReadyAPI Questions994Views0likes0Comments