Cucumber-JVM Maven 集成问题

Cucumber-JVM Maven Integration issue

我能够 运行 使用 @RunWith 和 @CucumberOptions 进行 Cucumber-JVM 测试 tags.But 我无法使用 Maven 执行测试。有人能指出我正确的方向吗?

我正在尝试使用 maven sure fire 插件,在搜索 internet.I 后认为,我犯了一个错误,我不知道 abt。

目录结构为:

 src\test\ 
   --config\
   --resources\ (has the .feature files)
   --steps\  (classes for the steps)

===================maven POM文件=====================

http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>

<groupId>Project</groupId>
<artifactId>Project</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>
    <cucumber.options>--format pretty</cucumber.options>
    <testsrc>src/test/</testsrc>
</properties>

<dependencies>

    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
    </dependency>

    <dependency>
        <groupId>info.cukes</groupId>
        <artifactId>cucumber-java</artifactId>
        <version>1.2.0</version>
    </dependency>

    <dependency>
        <groupId>info.cukes</groupId>
        <artifactId>cucumber-junit</artifactId>
        <version>1.2.0</version>
    </dependency>

    <dependency>
        <groupId>info.cukes</groupId>
        <artifactId>cucumber-core</artifactId>
        <version>1.2.0</version>
    </dependency>

    <dependency> <!-- External Dependency -->
        <groupId>ojdbc6</groupId>
        <artifactId>ojdbc6</artifactId>
        <scope>system</scope>
        <version>1.0</version>
        <systemPath>E:\work\test\Project\libs\ojdbc6dms.jar</systemPath>
    </dependency>

    <dependency> <!-- External Dependency -->
        <groupId>sqljdbc</groupId>
        <artifactId>ojdbc6</artifactId>
        <scope>system</scope>
        <version>1.0</version>
        <systemPath>E:\work\test\Project\libs\sqljdbc4.jar</systemPath>
    </dependency>
</dependencies>

<build>
    <testSourceDirectory>${testsrc}</testSourceDirectory>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.18.1</version>
            <configuration>
                <parallel>classes</parallel>
                <threadCount>1</threadCount>
                <includes>
                    <include>**/RunCukeTests.java</include>
                </includes>
            </configuration>
        </plugin>
    </plugins>
</build>

也尝试添加 Maven 编译器插件。