The principle of the spec tracker is simple. Parse specifications, match them with JUnit reports then display the corresponding traceability matrix.
Add this line to your application's Gemfile:
gem 'spec_tracker'
And then execute:
$ bundle
Or install it yourself as:
$ gem install spec_tracker
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 |
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 |
$ spec_tracker report
+---------------------------+-------------------------------------+----------------+
| some_specification_file.csv | |
+---------------------------+-------------------------------------+----------------+
| Identifiant du scénario | Nom du scénario | Statut du test |
+---------------------------+-------------------------------------+----------------+
| sign-up | [MyProject] Scenario 4.1.1 | ✅ |
| login | [MyProject] Scenario 4.2.1 | ✅ |
| logout | [MyProject] Scenario 4.3.1 | 😶 |
| delete-account | [MyProject] Scenario 5.1.1 | ❌ |
| news-feed | [MyProject] Scenario 5.1.2 | ✅ |
| like-news | [MyProject] Scenario 5.1.3 | ✅ |
| unlike-news | [MyProject] Scenario 5.1.4 | ❌ |
| topics | [MyProject] Scenario 5.1.5 | 😶 |
| subscribe-topic | [MyProject] Scenario 5.1.6 | 😶 |
| unsubscribe-topic | [MyProject] Scenario 6.1.1 | 😶 |
| account-information | [MyProject] Scenario 6.1.2 | 😶 |
| reset-password | [MyProject] Scenario 6.1.3 | 😶 |
+---------------------------+-------------------------------------+----------------+
| Progression | | 33% |
+---------------------------+-------------------------------------+----------------+
💡 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
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.
Bug reports and pull requests are welcome on GitHub at https://github.com/applidium/spec_tracker.