alaily
11 years agoNew Contributor
Plugin EventListener (SoapUI 5.1)
Hi all,
i created a plugin for Soapui Pro 5.1 using Maven with type "listener" and language "java". I could load the plugin over Plugin Manager. The event listener has the standard template, it should write in SoapUI log when a test case executed and stopped.
But when I start the some test cases, it doesn't write anything in log.
How can the listener be triggered and should it be registered anyway?
Thanks
i created a plugin for Soapui Pro 5.1 using Maven with type "listener" and language "java". I could load the plugin over Plugin Manager. The event listener has the standard template, it should write in SoapUI log when a test case executed and stopped.
package com.deutschebahn.TestListener;
import com.eviware.soapui.SoapUI;
import com.eviware.soapui.model.support.TestRunListenerAdapter;
import com.eviware.soapui.model.testsuite.TestCaseRunContext;
import com.eviware.soapui.model.testsuite.TestCaseRunner;
import com.eviware.soapui.plugins.ListenerConfiguration;
@ListenerConfiguration
public class PluginListener extends TestRunListenerAdapter {
@Override
public void beforeRun(TestCaseRunner testRunner, TestCaseRunContext runContext) {
SoapUI.log("Test " + testRunner.getTestCase().getName() + " starting...");
}
@Override
public void afterRun(TestCaseRunner testRunner, TestCaseRunContext runContext) {
SoapUI.log("Test " + testRunner.getTestCase().getName() + " stopping...");
}
}
But when I start the some test cases, it doesn't write anything in log.
How can the listener be triggered and should it be registered anyway?
Thanks