2016-04-15 3 views
0

У меня эта ошибка, когда я пытаюсь обновить версию огурца с 1.1.2 до 1.2.4. Я бегу по JDK1.8.Вариант исполнения Ошибка при обновлении огурца до версии 1.2.4

Это код не работает

RuntimeOptions runtimeOptions = new RuntimeOptions(System.getProperties(), argv); 

    Runtime runtime = new Runtime(new MultiLoader(classLoader), classLoader, runtimeOptions); 
    try { 
     runtime.writeStepdefsJson(); 
     runtime.run(); 
    } catch (Exception e) { 
     System.out.println("CucumberMain#run: Exception occured - " + e.toString()); 
     e.printStackTrace(); 
     if (e.toString().contains("None of the features at")) { 
      System.out.println("This should not be an error if feature file does not contains any scenario for" 
        + " execution or marked as ignore through tag " + e.getMessage()); 
     } else { 
      System.out.println("There is some problem in cucumber execution. Error is: " + e.getMessage()); 
      for (int index = 0; index < argv.length; index++) { 
       System.out.println("CucumberMain#run: Exception - argument#" + index + ": " + argv[index]); 
      } 
      // throw e; 
     } 
    } 

И это ошибка выход:

Error:(31, 41) java: no suitable constructor found for RuntimeOptions(java.util.Properties,java.lang.String[]) 
    constructor cucumber.runtime.RuntimeOptions.RuntimeOptions(cucumber.runtime.Env,java.util.List<java.lang.String>) is not applicable 
     (argument mismatch; java.util.Properties cannot be converted to cucumber.runtime.Env) 
    constructor cucumber.runtime.RuntimeOptions.RuntimeOptions(cucumber.runtime.formatter.PluginFactory,java.util.List<java.lang.String>) is not applicable 
     (argument mismatch; java.util.Properties cannot be converted to cucumber.runtime.formatter.PluginFactory) 
Error:(33, 27) java: no suitable constructor found for Runtime(cucumber.runtime.io.MultiLoader,java.lang.ClassLoader,cucumber.runtime.RuntimeOptions) 
    constructor cucumber.runtime.Runtime.Runtime(cucumber.runtime.io.ResourceLoader,cucumber.runtime.ClassFinder,java.lang.ClassLoader,cucumber.runtime.RuntimeOptions) is not applicable 
     (actual and formal argument lists differ in length) 
    constructor cucumber.runtime.Runtime.Runtime(cucumber.runtime.io.ResourceLoader,java.lang.ClassLoader,java.util.Collection<? extends cucumber.runtime.Backend>,cucumber.runtime.RuntimeOptions) is not applicable 
     (actual and formal argument lists differ in length) 
    constructor cucumber.runtime.Runtime.Runtime(cucumber.runtime.io.ResourceLoader,java.lang.ClassLoader,java.util.Collection<? extends cucumber.runtime.Backend>,cucumber.runtime.RuntimeOptions,cucumber.runtime.RuntimeGlue) is not applicable 
     (actual and formal argument lists differ in length) 
    constructor cucumber.runtime.Runtime.Runtime(cucumber.runtime.io.ResourceLoader,java.lang.ClassLoader,java.util.Collection<? extends cucumber.runtime.Backend>,cucumber.runtime.RuntimeOptions,cucumber.runtime.StopWatch,cucumber.runtime.RuntimeGlue) is not applicable 
     (actual and formal argument lists differ in length) 

Error:(35, 20) java: cannot find symbol 
    symbol: method writeStepdefsJson() 
    location: variable runtime of type cucumber.runtime.Runtime 
+0

Каковы ваши параметры клей установлен? Указывают ли они на определения шагов? Существуют ли клеенные пути? – MikeJRamsey56

ответ

0

огурец 1.2.4 имеет следующую зависимость. Проверьте установленные версии, чтобы убедиться, что они актуальны.

  • info.cukes »огурца сердечник 1.2.4
  • info.cukes» огурца-DEPS JVM 1.0.5
  • info.cukes »Огурец 2.12.2
  • info.cukes» огуречный-JUnit 1.2.4
  • junit »junit 4.12

Факультативно

  • net.sourceforge.cobertura »Cobertura 2.1.1
  • org.mockito» Mockito-все 1.10.19
Смежные вопросы