2

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);
   }
4

1 に答える 1

1

SoapUI からの呼び出し中にブール値パラメーターを見逃したと思います

testStep.init(baseUrl);

于 2012-10-29T19:15:40.383 に答える