No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
Render cucumber test output in a format consumable by TeamCity
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 2.0
 Project Readme

TeamCity Formatter

Render cucumber output in the format expected by TeamCity. This formatter is compatible with cucumber 2.0

Installation

Add this to your test suite's Gemfile:

gem 'teamcity_formatter'

Then execute:

$ bundle install

Or, install it directly:

$ gem install teamcity_formatter

Usage

Direct cucumber to use the formatter:

$ cucumber -f TeamCityFormatter::Formatter

Notes

Our overall goals in writing a cucumber formatter are:

  1. Generate TeamCity output from a cucumber 2 test suite
  2. Passing and failing test counts should match the same counts as the standard cucumber formatter

Cucumber elements are mapped simply to TeamCity test artifacts:

Cucumber TeamCity
Feature TestSuite
Scenario Test
Sceanrio Outline Example Test

Test failures include the stack trace of the exception which triggered the failure.

Features

The formatter now includes a flowId attribute in output messages. flowId is the test runner process id.

Pending Scenarios and Scenario Examples

Pending scenarios and scenario examples are logged as ignored tests.

Acknowledgements

This gem drew some code from cucumber_teamcity. The cucumber_teamcity formatter is not compatible with Cucumber 2.

Also, though we did not use code from their project, JetBrains makes available some TeamCity-related code here, which may be of interest to others researching TeamCity Cucumber formatters.

Thank you to contributors:

Contributor Contribution
PositiveAlex Allow cucumber to use the formatter directly from the command line
aklossrbh Support parallel_cucumber
gricsi Log pending scenarios and scenario examples as ignored tests
jonfinerty Use example rows from multiple example tables

License

Apache License, Version 2.0