Resource | Committing your Test Report

Committing your Test Report

We have come across a new technique which helps improve the github review process. We have started to commit our test reports.

This allows us to see and review the tests that have been added / changed in the pull request — and helps a developer visualise the test output on the Pull Request being submitted. Our testers can also review the PR and check the tests that we have added for the feature. Give it a go!

Example Pull Request with test_report

Example Pull Request with test_report

Script to commit -./bin/ file (and chmod +x it)

set -e
if [ -z “$(git status — porcelain)” ];
 echo “Generating test report…”
 bundle exec rspec — format=doc — no-color — order=default — out=test_report.txt
 echo “Test report updated”
 echo “Committing…”
 git add test_report.txt
 git commit -m “Updated test report”
 echo “Done!”
 exit 0
 echo “Please commit all current changes before updating the test report.”
 exit 1
Message sent
Message could not be sent