Cuporter
Scrapes your feature files and shows 2 possible reports:
- Tag Report: scenarios and examples per tag
- in Feature and Scenario Outline context, as appropriate
- sorted alphbetically by file path, scenario name, scenario outline name, example name
- optionally numbered*, counting scenarios and outline examples per tag
- Inventory Report: feature, scenario and example names
- may be filtered by tags, using same CLI syntax as Cucumber
- sorted alphbetically by file path, scenario name, scenario outline name, example name
- optionally numbered*, using 1 count of all scenarios and outline examples for the report
* HTML reports are always numbered.
Either report may be formatted in HTML, CSV, or Pretty Text.
- HTML reports do jQuery expand-collapse, with acklowedgment due to the Cucumber HTML formatter.
Consider this a stop-gap until we get this functionality in a proper cucumber formatter.
Example Tag Report Output: numbered pretty text
@failing
Feature: Abominable Aardvark
1. Scenario: An Aardvark eats ants
2. Scenario: Zee Zebra eats zee aardvark
Feature: Wired
3. Scenario: Everybody's Wired
Scenario Outline: Why is everybody so wired?
Examples: loosely wired
| arg1 | arg2 |
4. | foo | bar |
5. | shif | fish |
Examples: tightly wired
| arg1 | arg2 |
6. | foo | bar |
7. | frotz | knurl |
8. Scenario: Yellow lines
@ignore
Feature: Wired
Scenario Outline: Why is everybody so wired?
Examples: tightly wired
| arg1 | arg2 |
1. | foo | bar |
2. | frotz | knurl |
@wip
Feature: HTML formatter
1. Scenario: Everything in fixtures/self_test
Feature: not everyone is involved
2. Scenario: Failure is not an option, people
Feature: sample
3. Scenario: And yet another Example
Feature: search examples
4. Scenario: Generate PDF with pdf formatter
Install
$ gem install cuporter
Command Lines
help
$ ./bin/cuporter -h
Usage: cuporter [options]
-i, --in DIR directory of *.feature files
Default: features/**/*.feature
-I, --input-file FILE full file name with extension: 'path/to/file.feature'
-o, --out FILE Output file path
-f, --format [pretty|html|csv] Output format
Default: pretty text
-n, --numbers number scenarios and examples
-t, --tags TAG_EXPRESSION Filter on tags for name report.
TAG_EXPRESSION rules: see '$ cucumber --help' and http://github.com/aslakhellesoy/cucumber/wiki/Tags
-r, --report [tag|name] type of report
Default: tag
-T, --title STRING title of name report
Default: 'Cucumber Scenario Inventory'
run script directly
# pretty-print demo report to stdout
$ ./bin/cuporter -i fixtures/self_text
# same, but number the scenarios and example rows
$ ./bin/cuporter -i fixtures/self_text -n
# default input features/**/*.feature to named html output file
$ ./bin/cuporter -f html -o feature_tag_report.html
# filtered html name report, with non-default title
$ ./bin/cuporter -f html -o active_customer.html -r name -T "Active Customer Test Inventory" -t ~@wip -t @customer,@client