[英]groovy.lang.MissingMethodException: No signature of method:
我正在嘗試從soapUI運行Java eclipse文件。 這些文件當前在Eclipse中運行良好,但是當嘗試在soapUI中運行時,顯示以下錯誤消息。
groovy.lang.MissingMethodException:
No signature of method: com.company.automation.testing.Test()
is applicable for argument types: (java.lang.String)
values: [https://avcedevn1.mas.nsroot.net:17765/]
Possible solutions: init(java.lang.String, java.lang.Boolean), wait(), wait(long), wait(int), any(), print(java.lang.Object)
我認為這表明init參數設置錯誤,但是我相信我已將它們正確設置為init(String,Boolean)。 為什么顯示此錯誤消息,我該如何解決?
來自soapUI groovyscript的代碼:
import com.company.automation.testing.Test
def env = testRunner.testCase.testSuite.project.getPropertyValue("env")
def baseUrl = testRunner.testCase.testSuite.project.getPropertyValue("baseUrl")
log.info("The baseurl is "+baseUrl)
log.info("The env under test is "+env)
Test testStep = new Test();
testStep.init(baseUrl);
testStep.execute(null);
Eclipse的代碼片段:
package com.company.automation.testing;
import com.eviware.soapui.model.support.AbstractSubmitContext;
import com.eviware.soapui.model.testsuite.TestRunner;
public class Test extends BaseSelenium {
public static void main(final String[] args) {
final Test trial = new Test();
try {
trial.init("https://avcedevn1.mas.nsroot.net:17765/", false);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
trial.execute(null);
}
Eclipse中的BaseSelenium類代碼段:
public void init(final String baseUrl, Boolean useDifferentNavigURL) throws Exception {
this.startTime = System.currentTimeMillis();
driver = new InternetExplorerDriver();
this.baseUrl = baseUrl;
selenium = new WebDriverBackedSelenium(driver, baseUrl);
}
我想您從SoapUI調用時錯過了布爾參數
testStep.init(baseUrl);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.