Thomas Sundberg

November 1, 2012

Building the model

This post is available at http://www.thinkcode.se/blog/2012/11/01/building-the-model

8 Comments »

  1. Hallo Thomas,

    thank you for this wonderful article about this important subject.
    Do you have any experience in running cucumber with TestNG?

    Yours Michael

    Comment by Michael Wowro — November 7, 2012 @ 20:01

    • Hi!

      Currently I don’t have any experience of using TestNG and Cucuumber-JVM at the same time.
      I think I have seen references to it on the Cucumber mailing list, but I don’t remember the details.

      /Thomas

      Comment by Thomas Sundberg — November 7, 2012 @ 20:14

  2. Hi Thomas!

    Does some Maven Archetype exist to create a stub for such kind of project?

    Comment by Ilya Yevlampiev — March 12, 2013 @ 12:59

    • Hi!

      I don’t think so. I usually create my poms manually since it gives me the control I feel I want. Using an archetype usually does more than I want so I don’t use them.

      Cheers
      Thomas

      Comment by Thomas Sundberg — March 12, 2013 @ 13:27

  3. Hello Thomas:

    I have tried to execute the example you propose in your post, but there seems to be an error.
    I have created the files included in this post, but when I execute
    $ mvn test
    I get the following error:
    [ERROR] /home/my_name/dev/tests/cucumber-primer/model/src/test/java/se/waymark/rentit/steps/RentStepdefs.java:[6,29] error: package cucumber.annotation.en does not exist

    In your pom.xml you use cucumber-java 1.1.1, as it says:
    cucumber-java
    1.1.1
    But version 1.1.1 of cucumber-java des not contain cucumber.annotation.en

    The missing package exists in cucumber-java 1.0.1 (according to http://grepcode.com/file/repo1.maven.org/maven2/info.cukes/cucumber-java/1.0.1/cucumber/annotation/en/Given.java?av=f)

    So I think you mixed two versions of the example in the post, including a pom.xml that is newer than the .java. I have tried to use 1.0.1, 1.0.2, 1.0.7, … of the dependencies, but then a different error appears.
    Could you please correct me if I’m wrong or specify the right version of modules?

    Thank you.

    Comment by Jorge — June 5, 2013 @ 16:14

    • Hi!

      I obviously made a mistake when I wanted to build the example in small steps. I had prepared an intermediate step that actually wasn’t compiled with the blog post. The other steps has been compiled when I built the blog post. I forgot to update this intermediate step when I updated to a newer version of Cucumber.

      The import should be

      cucumber.api.java.en.Given;

      etc. as it is later in the text.

      I am glad that you spotted the error.

      Thanks!
      Thomas

      Comment by Thomas Sundberg — June 9, 2013 @ 21:29

  4. Hi Thomas,
    Its really good post. It helped me in undestanding Cucumber with Spring. Do you have any post with Spring-CucumberJVM-DBUnit combination as We are going to work on them.

    Comment by Ram — June 27, 2013 @ 18:17

    • Hi!

      I am glad you enjoyed it. It don’t have any example with that combination. Not at the moment at least.

      /Thomas

      Comment by Thomas Sundberg — June 27, 2013 @ 20:37


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: