CaryB
11 years agoContributor
Last Plugin Hurdle
Well, I thought I had this licked but I guess I was wrong. I've migrated my existing non-Maven project to the new architecture but I've had to (temporarily at least) turn my custom test step into an action instead. It works, but I hate to remove functionality that was working. When I create an absolute barebones test step SoapUI is unable to add it to my test case due to a null pointer in the auto factory.
All I've done at this point is created a class which extends the test step, overrode the run method as required, added a constructor, and included the PluginTestStep annotation.
When I try adding it to a test case this is what I get:
Error Log
So have I missed a step or is the infrastructure not working as expected?
import com.eviware.soapui.config.TestStepConfig;
import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase;
import com.eviware.soapui.impl.wsdl.teststeps.WsdlTestStepWithProperties;
import com.eviware.soapui.model.testsuite.TestCaseRunContext;
import com.eviware.soapui.model.testsuite.TestCaseRunner;
import com.eviware.soapui.model.testsuite.TestStepResult;
import com.eviware.soapui.plugins.auto.PluginTestStep;
@PluginTestStep(typeName = "",
name = "Sample Step",
description = "Does some sample stuff.",
iconPath = "disk.png")
public class SampleStep extends WsdlTestStepWithProperties {
public SampleStep(WsdlTestCase testCase, TestStepConfig config, boolean hasEditor, boolean forLoadTest) {
super(testCase, config, hasEditor, forLoadTest);
}
@Override
public TestStepResult run(TestCaseRunner testCaseRunner, TestCaseRunContext testCaseRunContext) {
return null;
}
}
All I've done at this point is created a class which extends the test step, overrode the run method as required, added a constructor, and included the PluginTestStep annotation.
When I try adding it to a test case this is what I get:
An error occurred [com.mycompany.SampleStep.buildTestStep(com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase, com.eviware.soapui.config.TestStepConfig, java.lang.Boolean)], see error log for details
Error Log
Tue Oct 28 10:05:14 EDT 2014:ERROR:java.lang.[b]NoSuchMethodException[/b]: com.mycompany.SampleStep.buildTestStep(com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase, com.eviware.soapui.config.TestStepConfig, java.lang.Boolean)
java.lang.NoSuchMethodException: com.mycompany.SampleStep.buildTestStep(com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase, com.eviware.soapui.config.TestStepConfig, java.lang.Boolean)
at java.lang.Class.getMethod(Unknown Source)
at [b]com.eviware.soapui.plugins.auto.factories.AutoTestStepFactory.buildTestStep[/b](SourceFile:37)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.createTestStepFromConfig(WsdlTestCase.java:295)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.insertTestStep(WsdlTestCase.java:484)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.addTestStep(WsdlTestCase.java:400)
at com.eviware.soapui.impl.wsdl.actions.testcase.AddWsdlTestStepAction.perform(AddWsdlTestStepAction.java:61)
at com.eviware.soapui.impl.wsdl.actions.testcase.AddWsdlTestStepAction.perform(AddWsdlTestStepAction.java:34)
at com.eviware.soapui.support.action.swing.SwingActionDelegate.actionPerformed(SwingActionDelegate.java:89)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
So have I missed a step or is the infrastructure not working as expected?