Question

I have many BDD stories/scenarios (450+ and rising) that I have inherited for an existing system: more info. The stories are organised using file system folders:

C:\specifications
   |
   + myproject
     |
     |- admin stories
     |  |- account_management.story
     |  +- finance_management.story
     |
     +- customer stories
        |- pay_bils.story 
        +- update_details.story

There are so many stories, that trying to understand the functionality from reading the story text files is like trying to understand a system's technical architecture from reading thousands of lines of source code.

I've tried using unix commands to summarise the stories, but this still doesn't help me to navigate the stories. For example, the following command prints out the story file name and the narrative even if the narrative spans multiple lines:

find . -name *.story -exec ls "{}" \; -exec sed -n '/^Narrative/,/^$/p' {} \;

Produces output similar to:

...

./stories/basket/basket.story
Narrative:
In order to buy goods
As a customer
I want to add items to my basket

...

This question is similar to this one, but there are some key differences:

  • The focus of this question is summarising and navigating stories, not pretty printing.
  • The need to zooming in and out, from high level to detailed and back.
  • The navigation will be by anyone needing to understand the stories - not just the business.
Was it helpful?

Solution 2

I used this project to export my stories to gherkin format, and then processed them using this project to create some really nice html output.

OTHER TIPS

I would name each of the files according to the particular capability it provides, then just parse the filenames.

So for instance, you might have:

  • pay bills.story
  • update account details.story
  • add items to basket.story

If you want to be really clever, you can then sort them into folders by the people who can do those things. So when you parse them, you'll end up with:

Admins can:

  • create new accounts
  • ban accounts

Finance managers can:

  • issue reminders
  • override bills
  • reissue statements

Customers can:

  • pay bills
  • update details
  • put items into baskets
  • buy items

That gives you the capabilities without the particular examples that illustrate them, and is a lot less browsing than looking at full narrative text.

I created a gist to reformat my Gherkin tests. In it, I describe how we lay out our directory structures (which works well for me):

https://gist.github.com/drmikecrowe/a3f8a31f2c7f2de1d078

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top