Cucumber-JVM - tests ignored (JUnit)

1,945 views
Skip to first unread message

Andrew Easter

unread,
Jan 16, 2012, 5:12:33 PM1/16/12
to cu...@googlegroups.com
Hi,

I've posted a couple of other messages to the forum over the last couple of days but, for some reason, my messages have not made it past moderation?

Anyway...I'm having a problem by where I can't get Cucumber-JVM to work either via running tests in IntelliJ (using JUnit runner) or via a Maven build on the command line. Basically my tests are just being ignored. I'm simply copied the example Java project into my own standalone project and all I get are console statements to say tests have been ignored. Having gone backwards and forwards with this, I'm becoming almost sure that this is some kind of issue with my environment.

OS = Windows 7
Maven = 3.0

A colleague of mine has got the identical project working via IntelliJ on Ubuntu without any changes. I've tried on two separate machines, both running Windows 7, and I get the same result with ignored tests. My pom looks like this:

         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                      http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.example</groupId>
    <artifactId>java-calculator</artifactId>
    <packaging>jar</packaging>
    <version>1.0.0-SNAPSHOT</version>
    <name>Examples: Java Calculator</name>

    <properties>
        <cucumber.jvm.version>1.0.0-RC3</cucumber.jvm.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-core</artifactId>
            <version>${cucumber.jvm.version}</version>
        </dependency>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-java</artifactId>
            <version>${cucumber.jvm.version}</version>
        </dependency>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-picocontainer</artifactId>
            <version>${cucumber.jvm.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-junit</artifactId>
            <version>${cucumber.jvm.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.picocontainer</groupId>
            <artifactId>picocontainer</artifactId>
            <version>2.14.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>gherkin</artifactId>
            <version>2.7.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.thoughtworks.xstream</groupId>
            <artifactId>xstream</artifactId>
            <version>1.4.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>

Example console output:

=========

Test '.Scenario: Give correct change.Given the following groceries:' ignored
Test '.Scenario: Give correct change.When I pay 25' ignored
Test '.Scenario: Give correct change.Then my change should be 4' ignored

=========

That is all I see. I really just don't understand what's missing here - it's as though Cucumber-JVM is not finding the *Stepdefs that match with features. I would be massively grateful for some help - I really do think it warrants investigation to rule out a potential issue with the Cucumber-JVM framework itself.

Thanks,

Andrew


aslak hellesoy

unread,
Jan 16, 2012, 6:43:29 PM1/16/12
to cu...@googlegroups.com
On Mon, Jan 16, 2012 at 10:12 PM, Andrew Easter <andrew...@gmail.com> wrote:
> Hi,
>
> I've posted a couple of other messages to the forum over the last couple of
> days but, for some reason, my messages have not made it past moderation?
>
> Anyway...I'm having a problem by where I can't get Cucumber-JVM to work
> either via running tests in IntelliJ (using JUnit runner) or via a Maven
> build on the command line. Basically my tests are just being ignored. I'm
> simply copied the example Java project into my own standalone project and
> all I get are console statements to say tests have been ignored. Having gone
> backwards and forwards with this, I'm becoming almost sure that this is some
> kind of issue with my environment.
>
> OS = Windows 7
> Maven = 3.0
>

And Cucumber 1.0.0.SNAPSHOT. That's old hat now. Try 1.0.0.RC4.

Aslak

> --
> You received this message because you are subscribed to the Google Groups
> "Cukes" group.
> To post to this group, send email to cu...@googlegroups.com.
> To unsubscribe from this group, send email to
> cukes+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/cukes?hl=en.

drewzilla

unread,
Jan 16, 2012, 6:51:42 PM1/16/12
to Cukes
The pom.xml is using 1.0.0-RC3 - see ${cucumber.jvm.version} - the
1.0.0-SNAPSHOT is just the version of my standalone Maven project.

I just upgraded to 1.0.0-RC4 and I'm getting the same issue.

Just before you realised there was a problem with moderation for new
members, I sent you a personal note with more info regarding a
potential class loading issue that seems to be preventing the
JavaBackend from loading...

Cheers,

Andrew

On Jan 16, 11:43 pm, aslak hellesoy <aslak.helle...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages