Groovy和SOAPUI缺少MethodException
在集成WireMock、Groovy和SOAPUI的过程中,我偶然发现了以下问题: org.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack:没有方法签名:*********.PingRequest.main()适用于参数类型:([Ljava.lang.String;)值:[[[]]可能的解决方案:wait(),wait(long),any(),find(),wait(long,int),每个(groovy.lang.Closure) 作为Groovy的新手,我不知道从哪里开始寻找。你们中的一个优秀的人能成为一盏指路明灯,告诉我解决方案在哪里吗 非常感谢 安格斯 代码如下:Groovy和SOAPUI缺少MethodException,groovy,soapui,Groovy,Soapui,在集成WireMock、Groovy和SOAPUI的过程中,我偶然发现了以下问题: org.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack:没有方法签名:*********.PingRequest.main()适用于参数类型:([Ljava.lang.String;)值:[[[]]可能的解决方案:wait(),wait(long),any(),find(),wait(long,int),每个(groovy.lang.
public static final int PORT = 8080
def baseUrl = 'http://localhost:8080/**************************'
@Rule
WireMockRule wireMockRule = new WireMockRule(PORT)
private final static Logger log = Logger.getLogger( "PingRequest" )
@Test
void testPingRequest() {
given:
def http = new HTTPBuilder(baseUrl)
def headers = ['Accept': 'application/xml', 'Content-Type': 'application/xml']
def requestBody = '{}'
http.handler.failure = http.handler.success
when:
def response = http.post(contentType: ContentType.XML, headers: headers, body: requestBody)
then:
wireMock.verifyThat(new RequestPatternBuilder(RequestMethod.GET, urlPathEqualTo("********************************")))
response
!response.errors
}
}
完整堆栈跟踪SAN软件包名称(感谢Michal M提供的提示):
org.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack:无方法签名:*********************************.PingRequest.main()适用于参数类型:([Ljava.lang.String;)值:[[[]]可能的解决方案:wait(),wait(long),any(),find(),wait(long,int),each(groovy.lang.Closure)你能分享你的代码吗?你使用Groovy作为测试步骤吗?添加代码。谢谢。你也可以添加完整的堆栈跟踪吗?2。你可能想考虑在你的问题中移除PangRead类中的包路径。