Skip to content
Gérald Reinhart edited this page Apr 13, 2018 · 41 revisions

the Gardener

The teaser

With BDD (Behavior Driven Development) :

  • the product owner and the developers really understand each other's
  • the overall development time is faster
  • the team is confident about its product and its development

The idea: what we want to do?

Several use cases are poorly addressed :

  • Support the collaboration between Developers and Product Owner during the specification stage
  • Give an easy access to the generated documentation

Let's create a web application to address them:

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

  • Main planned features
    • Show features in a pretty way
      • the features themselves
      • be able to decorate features so that the presentation is more userfriendly
      • a map of the scenarios included in a feature based on annotations (abstraction level / nomal, limit, error cases)
    • Easy access to those features :
      • several hierarchy to navigate to features : technical view, business view...
      • search based on annotation or on free text
    • Feature edition in collaboration
      • be able to create and edit features
      • be able to assign feature for review
      • dasboard with draft features to be reviewed

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 main use cases

Configure a hosted project in theGarderner to get features

TODO : theGardener_sequence_diagram to get features

Access to features

TODO : theGardener_sequence_diagram to get features

Collaboration product owner and developers to write a feature

Use case diagram

The architecture

Details of the use cases covered by this architecture

architecture


Note : The project is at the begging of the development.

Clone this wiki locally