Thomas Sundberg

November 1, 2012

Building the model

This post is available at


  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.


      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.


      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/[6,29] error: package cucumber.annotation.en does not exist

    In your pom.xml you use cucumber-java 1.1.1, as it says:
    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

    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;

      etc. as it is later in the text.

      I am glad that you spotted the error.


      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.


      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: Logo

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

Google photo

You are commenting using your Google 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 )

Connecting to %s

Create a free website or blog at

%d bloggers like this: