Testplan
This gem helps organize rspec cases into testplans. It replaces the need for an test management application like TestLink.
TODO
- autonumbering of specs
- add Example group aliases like :requirement and :project
- add Requirements Coverage Report PDF functionality (sep. Gem)
- add Estemated Hours Impact Report PDF functionality (sep. Gem)
Installation
Add this to your Gemfile
gem 'testplan'
And then execute:
$ bundle
Or install it yourself as:
$ gem install testplan
Add this to your rakefile:
require 'rubygems'
require 'testplan'
You need a config/testplan.rb conf file like below
$some_cases_for_frontend = %w(
req-0036-01
req-0036-02
req-0037-01
req-0037-02
)
$some_cases_for_backend = %w(
req-0038-01
)
Testplan::Setup::init -> do {
multi_env: 0,
testplans: {
ci: [:ci_frontend, :ci_backend],
production: [:production_frontend, :production_backend],
},
platforms: {
ci_frontend: {
baseurl: 'http://www.ci-myapp.com',
cases: $some_cases_for_frontend,
},
ci_backend: {
baseurl: 'http://backend.ci-myapp.com',
cases: $some_cases_for_backend
},
production_frontend: {
baseurl: 'http://www.myapp.com',
cases: $some_cases_for_frontend,
},
production_backend: {
baseurl: 'http://backend.myapp.com',
cases: $some_cases_for_backend
}
}
}
end
the cases symbol is required, other symbols are converts to ENV VARS
Usage
when you run rake testplan:build_ci
these commands will be
executed
BASEURL='http://www.ci-myapp.com' bundle exec rake testplan:junit SPEC_OPTS=\"-e req-0036-01\"
BASEURL='http://www.ci-myapp.com' bundle exec rake testplan:junit SPEC_OPTS=\"-e req-0036-02\"
BASEURL='http://www.ci-myapp.com' bundle exec rake testplan:junit SPEC_OPTS=\"-e req-0037-01\"
BASEURL='http://www.ci-myapp.com' bundle exec rake testplan:junit SPEC_OPTS=\"-e req-0037-02\"
BASEURL='http://backend.ci-myapp.com' bundle exec rake testplan:junit SPEC_OPTS=\"-e req-0038-01\"
Contributing
- Fork it ( https://github.com/[my-github-username]/testplan/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request