Human readable tests and build chaining in July’s VSTS extension round-up

Our community of publishers continues to grow and the contributions they’re making are great. This month I’ve got an extension for chaining build definitions together, and another that was written because people were searching for it in the Marketplace.


See it in the Marketplace here:

Living documentation is the term used to describe system documentation that is up-to-date and easily understood. A prime example of this are feature files written in Gherkin, which uses natural language to describe how an application is expected to behave in a given scenario. By describing specifications in a natural language, all stakeholders (business, development, testing, requirements etc.) can understand and discuss the specifications on an equal footing. These specifications in turn form an important part of the system documentation, and are commonly used in agile development methods such BDD and Specification by Example.

For many .NET developers, the open source project SpecFlow is their tool of choice for automating test scenarios written in Gherkin with Visual Studio. However, these Gherkin files are plain text files, and are generally stored in a code repository and inaccessible to many team members. While the SpecFlow Visual Studio extension supports syntax highlighting for Gherkin in Visual Studio, not all stakeholders have access to Visual Studio, in particular business stakeholders.

SpecFlow+ LivingDoc bridges this gap, making the specifications written in Gherkin accessible to all team members in VSTS. SpecFlow+ LivingDoc is part of SpecFlow+, a series of (optional) paid extensions for SpecFlow. SpecFlow+ LivingDoc takes your feature files and parses them so that they can be displayed in VSTS with syntax highlighting and formatting. This makes the feature files much easier to navigate than plain text without any formatting.

Formatting includes the following:

  • Gherkin keywords syntax highlighting
  • Tables
  • Alternating background colours for Given/Then/When sections
  • Support for images embedded via Markdown

You can also preview scenarios using specific test values defined in tables:

The living documentation is generated as part of the build process, and a default build step is included when installing the extension. Building the documentation simply requires you to add this step to your build and enter the path of the VS project. If you only want to generate the documentation, you can create a build using only this step; you do not actually need to build the application. Once the documentation has been generated, it is accessible from the Test menu in VSTS. The documentation has a tree structure, and you can search for text in specific feature or scenario titles, as well as in individual steps.

The biggest benefits of SpecFlow+ LivingDoc’s approach are for the team as a whole, as all stakeholders have easy (read-only) access to the specifications at any time. Generating the living documentation can be fully automated once configured, so the benefits are achieved with minimal time investment. SpecFlow+ LivingDoc is available as part of SpecFlow+. You can request a trial key for SpecFlow+ that will also unlock SpecFLow+ LivingDoc. When using SpecFlow+ LivingDoc without a valid license key, only the first 10 entries in the living documentation can be viewed.

Trigger Build Task

See it in the Marketplace here:

Extensions like this one are what make our community great. Not only is it a great feature, but the documentation is comprehensive and the code is available on GitHub so others in the community can learn and contribute.

If you need to chain builds together, then check out Trigger. It allows you to execute other build definitions as part of the currently running definition. The task offers a lot of options and customizability for the triggered build definition:

  • They can be within the same Team Project or across other projects
  • They can be configured to run only if certain criteria are met, like if the last build of a particular build definition was successful
  • They can be configured to be requested by the same user, or using a different authentication method

This is a great task, but don’t take my word for it. In the words of some of the reviewers

  • “You are the man!”
  • “The coolest trigger we have!”

Are you using (or building) an extension you think should be featured here?

I’ll be on the lookout for extensions to feature in the future, so if you’d like to see yours (or someone else’s) here, then let me know on Twitter!