BillR
未讀,2013年2月19日 下午3:19:012013/2/19登入以回覆作者
登入以轉寄訊息
你的權限不足,無法在這個群組刪除訊息
登入以檢舉訊息
該群組的電子郵件地址為匿名,或你需要檢視成員電子郵件地址的權限才能查看原始貼文
收件者:cu...@googlegroups.com
I'm trying to get maven working with 1.1.2 in order to put together a github pull request illustration of a bug that a colleague who is on vacation reported in the context of our gradle setup. So I'm trying to get old-version maven code working with the latest cuke jvm.
Here is the error (seems to be same dir being searched twice):
Tests in error:
initializationError(com.xoom.qa.cuke.steps.RunCukesTest): Duplicate step definitions in com.xoom.qa.cuke.steps.RegularSteps.doomedGiven() in file:/home/xoom/cuke_bug/target/test-classes/ and com.xoom.qa.cuke.steps.RegularSteps.doomedGiven() in file:/home/xoom/cuke_bug/target/test-classes/
All the classes in that tree:
~/cuke_bug> find /home/xoom/cuke_bug/target/test-classes/ -name "*.class"
/home/xoom/cuke_bug/target/test-classes/com/xoom/qa/cuke/steps/RegularSteps.class
/home/xoom/cuke_bug/target/test-classes/com/xoom/qa/cuke/steps/BeforeAfterSteps.class
/home/xoom/cuke_bug/target/test-classes/com/xoom/qa/cuke/steps/RunCukesTest.class
Here is the surefire setup:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<configuration>
<argLine>-Xmx2048m</argLine>
<systemProperties>
<property>
<!-- When Cucumber-JVM supports replace/append of cucumber.options, this can be removed, along with the
<tags> property above. msp 6/14/2012 -->
<name>cucumber.options</name>
<value>--tags ${tags} --format pretty --monochrome --glue classpath:com/xoom/qa/cuke/steps</value>
</property>
</systemProperties>
</configuration>
...
Here is the one java file that exists with the Given method:
package com.xoom.qa.cuke.steps;
import cucumber.api.java.en.Given;
import static org.junit.Assert.*;
public class RegularSteps {
@Given("^a step that fails$")
public void doomedGiven() {
throw new RuntimeException("Step fails..");
}
}
And here is the junit file:
package com.xoom.qa.cuke.steps;
import cucumber.api.junit.Cucumber;
import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
//@Cucumber.Options(format="pretty", monochrome = true)
public class RunCukesTest {
}
I'm not seeing why cuke is finding the same file twice.
Thanks,
Bill