Monday, November 14, 2016

Welcome our .feature-Files

Hello everyone,

today we want to introduce you our new family members in our use-case-family, the .feature-File. It's much more readable than an Activity Diagram. First, we created them for our two existing use cases, set game rules and calculate score.


Game rules:



Feature: Game rules
       In order to set the game rules
As a triangle
I want to define the events for the different types of fields in the overworld

Scenario: Normal Field
       Given I want to move in any direction
       When I would move on a normal field
       Then I move forward
      
Scenario: Poison Field
       Given I want to move in any direction
       When I would move on a poison field
       Then I move forward
       And my energy consumption becomes higher
      
Scenario: Energy Field
       Given I want to move in any direction
       When I would move on an energy field
       Then I move forward
       And my energy becomes higher
      
Scenario: Wall Field
       Given I want to move in any direction
       When I would move on a poison field
       Then I don't move forward
      
Scenario: Death Field
       Given I want to move in any direction
       When I would move on a death field
       Then I don't move forward
       And I die



Calculate Score:



Feature: Calculate Score
       In order to rate a playthrough of the AI
As a Player
I want to calculate a number named highscore to see immediately if it was good or bad

Scenario: Display the score
       When I finished the game
       Then summarize the distance for every single triangle
       And the score is displayed
      
Scenario: Add score in highscore list
       Given the score is calculated
       When the score is higher then the last entry of the highscore list
       Then add score to correct position in highscore list




Soon you will find them also in our updated versions of the UseCase Specification.

Have a nice day,
TheLearningTriangle-Team


4 comments:

  1. Hi guys,

    very interesting scenarios!
    Which tasks will you do in the first sprint?

    greetings,
    SnowWhite

    ReplyDelete
  2. Hello Anonym!

    Thank you for your reply!
    We want to implement the game rules first.

    Greethings!

    TheLearningTriangle-Team

    ReplyDelete
  3. Hello,

    You feature files look good!
    But if you have a look at the reference for gherkin language and the feature files of last year, you may notice that the Scenarios are written as a example of a flow and therefore you precisely define what happens, like "I move in the right direction". To write any direction is not applyable for using the feature file in tests, because your test can't go in any direction you have to test one described direction.
    I hope I could help you to prevent problems in further development.
    Nevertheless, keep on you good work!

    Best regards,
    Marco Kolb (BestPlaces-Team)

    ReplyDelete
    Replies
    1. Hello Marco!

      Thank you really much for your reply.
      You said, we should edit our feature in terms of moving direction, but it is very hard for us to determine how a triange moves on a certain field. Therefore we just can say, that it enter a specific field. Then we said what should happen to the triangle moving on it.
      But thank you very much for your response!

      Steven (TheLearningTriangle-Team)

      Delete