Render cucumber output in the format expected by TeamCity. This formatter is compatible with cucumber 2.0
Add this to your test suite's Gemfile:
$ bundle install
Or, install it directly:
$ gem install teamcity_formatter
Direct cucumber to use the formatter:
$ cucumber -f TeamCityFormatter::Formatter
Our overall goals in writing a cucumber formatter are:
- Generate TeamCity output from a cucumber 2 test suite
- Passing and failing test counts should match the same counts as the standard cucumber formatter
Cucumber elements are mapped simply to TeamCity test artifacts:
|Sceanrio Outline Example||Test|
Test failures include the stack trace of the exception which triggered the failure.
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.
This gem drew some code from
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:
|PositiveAlex||Allow cucumber to use the formatter directly from the command line|
|gricsi||Log pending scenarios and scenario examples as ignored tests|
|jonfinerty||Use example rows from multiple example tables|
Apache License, Version 2.0