A POC of automating population of testrail data from rspec json output file
You will first have to tell rspec to use json formatted output to a file like so
bundle exec rspec spec/acceptance --format j --out output.json
After we get the rspec json output, we set a number of environment variables and run the rake task:
- RESULT_FILE - Required. JSON output file from beaker-rspec
- TESTRAIL_USER - Required. Testrail Username
- TESTRAIL_PASS - Required. Testrail Password
- SUITE_NAME - Required. Test suite name within Modules & Forge project
- GITHUB_REPO - Required. Repo name within the puppetlabs org.
bundle install --path .bundle/gems RESULT_FILE=results.json TESTRAIL_USER=ABC TESTRAIL_PASS=ABC SUITE_NAME='Automation Test' GITHUB_REPO=puppetlabs-vcsrepo bundle exec rake update_testrail
I did not write this, the code in this class is pulled from here.