I've created a simple listener but when I remove the commented line, SoapUI doesn't start ...
And with the commented line it start but the dos prompt shows this "Error initializing Listener: java.lang.ClassNotFoundException: soapui.testStep.TestStepListener".
What's the problem ?
<?xml version="1.0" encoding="UTF-8"?>
<tns:soapui-listeners xmlns:tns="http://eviware.com/soapui/config">
<tns:listener id="TestStepListener" listenerClass="soapui.testStep.TestStepListener" listenerInterface="com.eviware.soapui.model.testsuite.TestRunListener" />
</tns:soapui-listeners>
package soapui.testStep;
import com.eviware.soapui.model.testsuite.TestRunContext;
import com.eviware.soapui.model.testsuite.TestRunListener;
import com.eviware.soapui.model.testsuite.TestRunner;
import com.eviware.soapui.model.testsuite.TestStepResult;
import com.eviware.soapui.model.testsuite.TestStepResult.TestStepStatus;
import com.eviware.soapui.support.UISupport;
public class TestStepListener implements TestRunListener {
public void beforeRun(TestRunner testRunner, TestRunContext runContext) { }
public void afterRun(TestRunner testRunner, TestRunContext runContext) { }
public void beforeStep(TestRunner testRunner, TestRunContext runContext) { }
public void afterStep(TestRunner testRunner, TestRunContext runContext, TestStepResult result) {
// UISupport.showInfoMessage("Step[" + runContext.getCurrentStepIndex() + "] finished with result " + result.getStatus());
if (result.getStatus()==TestStepStatus.FAILED) {
UISupport.showInfoMessage("Go to step \"Loop to next properties file\"");
testRunner.gotoStepByName("Loop to next properties file");
}
}
}