Week #5 – Gherkin .feature files

Hey There,

This weeks task was to implement the BDD (behaviour-driven-development) approach using cucumber tests into our project.

Now, as we are developing a game rather than an application with clear, pre-defined use cases, we felt like forcing a test suite integration in our development process wouldn’t be any helpful and most likely cause some issues. We therefore decided on the following:

To prove that we understood the concept application testing using cucumber and how to write .feature files, we implemented a working testing scenario that checks the custom links on the right side of this blog.

We wrote the .feature file you can see at the top that explains the exact test procedure in understandable sentences.

When executed cucumber clicks on each of the defined links and checks for an expected title change.
If any of the links changes to a different title, the scenario will fail.

Test in action
Successful test result

You can find the source code for this sub-project in our main game repository under this link:

GyroGame – Cucumber Demo

That’s about it for this week, thanks for reading.

Simon & Manu

7 thoughts on “Week #5 – Gherkin .feature files

  1. Hey GyroGame-Team,
    Your feature files look good to us. What we really like is, that you have clearly stated that implementing testing is nowhere near useful at the moment. Putting in this small clip of how your tests work did show us, that you have understood how cucumber works!

    Since there is no automatic testing yet, we hope we can try your game pretty soon and be “the tester”!
    Keep up the good work!
    Your TrackYourFit-Team

    1. Hey,

      Thank you for your comment!
      Same as most of the other projects, there will be a download link available on this very blog as soon as we have playable builds ready. If you ask us very nicely we might even lend you one of the cubes so you don’t have to build it yourself 😀

      Regards,
      Manu

  2. Hey,
    We think your feature file looks great. You commented the steps of your implementation and your Scenario is easy to read and understand.
    The video helps understanding what really happens when testing with cucumber and shows that everything works correctly.

    Even though a game can’t really be tested this you thought of a good Scenario and nice to see a Unity group testing something else than a login!

    Your LogicGame Team

    1. Thank you for your comment!
      We felt like there’s no use in testing some random website, so we tried to test some features that are at least connected to our project.

      Regards,
      Manu

  3. Hey guys,
    half the time size, same approach to the testing task: just not testing your own project. As far as we know, Unity doesn’t even support .feature files, so it’s good you didn’t try. Looks like your test went well, so congrats for that. Keep up your work, we’d love to see more from you, your project looks promising (especially your headstart).
    Short question: how are you planning on making your controls snappy?
    Stay classy,
    Ted’s Team

Comments are closed.