Skip to content
Gérald Reinhart edited this page Nov 26, 2018 · 37 revisions

the Gardener

The teaser

See BDD_TheGardener_in_a_nutshell.pdf

The features

See BDD_TheGardener_features.pdf

The roots

See BDD_TheGardener_roots.pdf

The name

the Gardener : he's taking care of your features

Why ? The technology behind the BDD features is mainly driven by https://cucumber.io/. So it's a joke, the gardener is taking care of the plants, is taking care of the cucumbers, is taking care of your features.

As the main purpose of the application is to do a workflow so that Product Owner and Developers can write and iterate on a feature with several scenarios we can see that as little cucumbers that are growing....

The plan

See the milestones

The prerequisites

In which context, we can use theGardener to take cake of our projects features ?

  1. Code source managed by Git.
  2. One branch is considered stable. By default : master.
  3. The same Git project cannot be reference twice from 2 different git hosts.
  4. theGardener consider that the development workflow is the feature branch workflow :
    • Create a feature branch
    • Define the specification on the feature branch
    • Implement the feature this branch
    • Merge the feature branch into the stable branch

The implementation of theGardener apply the "Convention over configuration" principle, this means that there shouldn't be too much to configure in theGardener in order to exploit its features.

The recommendations

TheGardener exploit the annotations linked to the scenario. Especially, some features of theGarderner assume that each scenario can have :

  1. A level of abstraction :
    • @level_0_high_level: anybody can understand it
    • @level_1_specification (by default): DEV, Product Owner, Tester of the team can understand and update it
    • @level_2_technical_details: DEV of the team can understand and update it
  2. A case type :
    • @nominal_case (by default)
    • @limit_case
    • @error_case
  3. A status :
    • @draft
    • @ready
    • @ongoing
    • @valid (by default)

It will work fine if those annotations are not defined for the scenarios but if you want to exploit all theGardener features, it worth to define theme.

Some examples :

Let's assume we are in a library and we want to implement a new suggestion service :

As a user of the library, I wish to book suggestions to make discoveries

Acceptance criteria :

  • Book not read by the user
  • Book available

We can define this user story with the following scenarios :

 @level_0_high_level @nominal_case @draft
  Scenario: providing book suggestions
    Given a user
    When we ask for suggestions
    Then the suggestions are popular and available books adapted to the age of the user

  @level_1_specification @nominal_case @draft
  Scenario: suggestions of popular and available books adpated to the age of the user
    Given the user "Tim"
    And he is "4" years old
    And the popular categories for this age are
      | categoryId | categoryName    |
      | cat1       | Walt Disney     |
      | cat2       | Picture books   |
      | cat3       | Bedtime stories |
    And the available books for categories "cat1,cat2,cat3" are
      | bookId | bookTitle                 | categoryId |
      | b11    | Peter Pan                 | cat1       |
      | b21    | Picture book about farm   | cat2       |
      | b31    | The tortoise and the hare | cat3       |
    When we ask for "3" suggestions
    Then the suggestions are
      | bookId | bookTitle                 | categoryId |
      | b11    | Peter Pan                 | cat1       |
      | b21    | Picture book about farm   | cat2       |
      | b31    | The tortoise and the hare | cat3       |


  @level_1_specification @limit_case @draft
  Scenario: unknown user, no suggestion
    Given the user "Lise"
    And he is unknown
    When we ask for "3" suggestions
    Then there is no suggestions

  @level_1_specification @error_case @draft
  Scenario: one service on which the suggestion system depends on is down
    Given the user "Tim"
    And impossible to get information on the user
    When we ask for "3" suggestions
    Then the system is temporary not available

 @level_2_technical_details @nominal_case @ongoing
  Scenario: suggestions of popular and available books adpated to the age of the user, he have never booked the suggestions
    Given the user from http://my.library.com/user/Tim
      | field  | value |
      | userId | Tim   |
      | age    | 4     |
    And the categories from http://my.library.com/category?popular=true&age=4
      | categoryId | categoryName    |
      | cat1       | Walt Disney     |
      | cat2       | Picture books   |
      | cat3       | Bedtime stories |
    And the books from http://my.library.com/search?categories=cat1,cat2,cat3&available=true
      | bookId | bookTitle                 | categoryId |
      | b11    | Peter Pan                 | cat1       |
      | b21    | Picture book about farm   | cat2       |
      | b31    | The tortoise and the hare | cat3       |
    And the books from http://my.library.com/user/Tim/books
      | bookId | bookTitle | categoryId |
      | b11    | Peter Pan | cat1       |
    When we call http://localhost:9998/suggestions?userId=Tim&maxResults=3
    Then the http code is "200"
    Then the suggestions are
      | bookId | bookTitle                 | categoryId |
      | b21    | Picture book about farm   | cat2       |
      | b31    | The tortoise and the hare | cat3       |


  @level_2_technical_details @limit_case @ready
  Scenario: unknown user, no suggestion
    Given the user from http://my.library.com/user/Lise return http status "404"
    When we call http://localhost:9998/suggestions?userId=Lise&maxResults=3
    Then the http code is "404"

  @level_2_technical_details @error_case @ready
  Scenario: one service on which the suggestion system is down
    Given the user from http://my.library.com/user/Lise return http status "500"
    When we call http://localhost:9998/suggestions?userId=Lise&maxResults=3
    Then the http code is "503"


The architecture

Details of the use cases covered by this architecture

architecture

The entities

entities


Note : The first milestone is still work in progress but we are not far from the end of the tunnel.

Want to talk about it ? Join us on our Discord channel

Clone this wiki locally
You can’t perform that action at this time.