SpecTracker

The principle of the spec tracker is simple. Parse specifications, match them with JUnit reports then display the corresponding traceability matrix.

Installation

Add this line to your application's Gemfile:

gem 'spec_tracker'

And then execute:

$ bundle

Or install it yourself as:

$ gem install spec_tracker

Usage

Configuration

Parameter CLI Parameter Default value Description
spec_path spec-path specifications Path to the specification file(s). Expects a relative path to a file or a director
spec_type spec-type csv Type of specification files. Available values : csv, gherkin
scenario_id_header scenario-id-header Scenario ID Header of the CSV column that contains the scenario names
scenario_name_header scenario-name-header Name/Rule Header of the CSV column that contains the scenario IDs
scenario_id_regex scenario-id-regex \[([a-zA-Z\-]+)\] Regexp to find scenario IDs in the test names. Default is kebab-case words
test_report_path test-report-path test/reports Path to the test reports. Expects a relative path to a file or a directory
locale locale fr Locale for text output. Available values : fr, en

Test result symbols

Symbol Meaning
There is a test for this scenario and it PASSES
😶 No tests were found for this scenario
There is a test for this scenario and if FAILS
There is a SKIPPED test for this scenario

CLI

$ spec_tracker report
+---------------------------+-------------------------------------+----------------+
|                            some_specification_file.csv          |                |
+---------------------------+-------------------------------------+----------------+
| Identifiant du sc

💡 v0.1.0 users can still print reports with the following command : spec_tracker report --scenario_id_regex="#((\d\.?)*\d)" --scenario-id-header="#Scenario"

Display report help :

$ spec_tracker help report

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/applidium/spec_tracker.