Thomas Sundberg

November 1, 2012


This post has been migrated to

Previous – A SOAP web service

I have shown you five different ways to implement something on top of a common model using the same behaviour. I hope you can agree that it is obvious that BDD and Cucumber-JVM is not just meant for testing GUIs. It can be used to assert any behaviour.

Remember that you never shall specify implementation details and always define the behaviour in declarative manner. You are interested in the behaviour of the system and less interested in the implementation. The implementation may change, but the expected behaviour may not change with it. Unless you implement new functionality of course or change the desired behaviour of the system.



  1. Well written article!!! This article deserve a big plaudit. I am very grateful for the amount of effort you had put in not just to explain but to also demonstrate with examples. I appreciate your hard work on this and I have a learned a lot not only from these examples here, but also from your previous post. You are a star, thanks for sharing this tutorial with me and many others. You have done a great job. Best Regards

    Comment by seggy — November 8, 2012 @ 05:25

  2. Great job! As said in previous comment, I also appreciate the effort you have put in. I really appreciate the structure with a single test that is used for all implementations. Perhaps the conclusion should gain from some graphical illustration that shows how the single test case can access different implementations and the means used (FEST, RestAssured, Selenium). Also, the Wicket framework has built-in support for testing that is a lot faster than Selenium that perhaps could have been considered.

    Comment by Per Lundholm (@perlundholm) — November 29, 2012 @ 12:01

    • I am glad you liked it.

      I could have used the built in testing system for Wicket. That could be the subject for another post.

      I will consider adding a picture to show the relations. It would probably make it easier to understand the entire setup.


      Comment by Thomas Sundberg — December 1, 2012 @ 10:50

  3. Great article!

    I’m a QA, so it gave me much more understanding of developers’ side and the similarities in many approaches, as well as I’ve faced the first time with rest-assured here, hope it will be helpful in my further work.

    It is interesting for me, how the BDD behavior could be applied for Android apps? I know that the Robotium allows to do it, and Cucumber JVM as a BDD tool could be ran over the Robotium, so would it be possible to build a test project that asserts both REST API + Android app that uses this REST API in the same feature test?

    Comment by Ilya Yevlampiev — March 13, 2013 @ 11:05

    • Hi!

      If Robotium can be used to verify an Android app and driven by Cucumber, then it would be possible to create such an example.

      I am glad you liked my writing!

      Comment by Thomas Sundberg — March 13, 2013 @ 14:42

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 )

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

%d bloggers like this: