Contributions
Can't Get soapui.demo.DemoListener to run under 4.5.1
The Problem I can't get the standard Groovy script SoapUI Demo Listener to work. I did the following: 1) In soapUI-Pro-4.5.1\bin\listners, I setup demo-listners.xml as follows: <?xml version="1.0" encoding="UTF-8"?> <tns:soapui-listeners xmlns:tns="http://eviware.com/soapui/config"> <tns:listener id="DemoListener" listenerClass="com.eviware.soapui.support.scripting.listeners.ScriptTestRunListener" groovyClass="soapui.demo.DemoListener" listenerInterface="com.eviware.soapui.model.testsuite.TestRunListener"/> </tns:soapui-listeners> Under soapUI-Pro-4.5.1\bin\scripts\soapui\demo, I have DemoListener.groovy as follows: /* * soapUI Pro, copyright (C) 2007-2011 eviware software ab */ package soapui.demo import com.eviware.soapui.SoapUI import com.eviware.soapui.model.support.TestRunListenerAdapter import com.eviware.soapui.model.testsuite.TestRunContext import com.eviware.soapui.model.testsuite.TestRunner public class DemoListener extends TestRunListenerAdapter { public void beforeRun( TestRunner testRunner, TestRunContext runContext ) { SoapUI.log.info("!!!!!!!! - I have started"); } public void afterRun( TestRunner testRunner, TestRunContext runContext ) { SoapUI.log.info "!!!!!!!!! - I have finished" } } 2) I restarted SoapUI. In SoapUI log I get: Fri Apr 04 14:41:06 EST 2014:INFO:Adding listeners from [C:\Program Files\SmartBear\soapUI-Pro-4.5.1\bin\listeners\demo-listeners.xml] 3) My expectation is that I should also see at startup, a SoapUI log message like: exec] 16:08:48,586 INFO [SoapUIProGroovyScriptEngineFactory] Setting Script Library to [C:\SoapUI ..... the path to scripts". I don't get this line. 4) When I run one of my tests from whithin the SoapUI environment, I expect to see the listener log the start and the end of the test in the script log. I see nothing like this in either the script log or the soapUI log. 5) I tried the following trick, I changed groovyClass="soapui.demo.DemoListener" in the listener.xml to groovyClass="BLAHBLAHBLAHsoapui.demo.DemoListener", the restarted SoapUI, this time on startup load up complains about not being able to find the script, so I know SoapUI is loading it (??). Any ideas? What am I missing? Cheers, Tim11 years agoPlace ReadyAPI QuestionsReadyAPI Questions948Views0likes0Comments