我正在编写一个脚本,以在 SoapUI 4.5.1 中同时跨多个项目自动运行多个 TestSuite:
import com.eviware.soapui.impl.wsdl.panels.testsuite.*;
def properties = new com.eviware.soapui.support.types.StringToObjectMap();
def currentProject = testRunner.getTestCase().testSuite.getProject();
def workspace = currentProject.getWorkspace();
def otherProject = workspace.getProjectByName('Project 1');
def otherTestSuite = CGReportsProject.getTestSuiteByName('TestSuite 1');
otherTestSuite.run(properties, true);
但是,我也尝试为脚本运行的每个测试套件打开测试套件面板,以允许对套件的进度进行可视化跟踪。那就是我遇到麻烦的地方:
ProWsdlTestSuitePanelBuilder.buildDesktopPanel(otherTestSuite);
此特定行引发错误:
groovy.lang.MissingMethodException: No signature of method:
static com.eviware.soapui.impl.wsdl.panels.testsuite.
ProWsdlTestSuitePanelBuilder.buildDesktopPanel() is
applicable for argument types:
(com.eviware.soapui.impl.wsdl.WsdlTestSuitePro) values:
[com.eviware.soapui.impl.wsdl.WsdlTestSuitePro@1d0b2bc6]
Possible solutions:
buildDesktopPanel(com.eviware.soapui.impl.wsdl.WsdlTestSuitePro),
buildDesktopPanel(com.eviware.soapui.model.ModelItem),
buildDesktopPanel(com.eviware.soapui.impl.wsdl.WsdlTestSuite),
buildDesktopPanel(com.eviware.soapui.model.ModelItem),
buildDesktopPanel(com.eviware.soapui.impl.wsdl.WsdlTestSuite),
buildDesktopPanel(com.eviware.soapui.model.ModelItem)
error at line: 12
我的意思是,我向 ProWsdlTestSuitePanelBuilder.buildDesktopPanel() 抛出的 WsdlTestSuitePro 实例由于某种原因未被接受 - 但我不知道为什么。
在这一点上,我也不确定 ProWsdlTestSuitePanelBuilder.buildDesktopPanel() 是否真的是我想要的,但它是唯一需要 WsdlTestSuitePro 的 UI 构建器,因为这显然是我所有的测试套件。