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/test_report.sh file (and chmod +x it)

#!/bin/bash
set -e
if [ -z “$(git status — porcelain)” ];
then
 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
else
 echo “Please commit all current changes before updating the test report.”
 exit 1
fi
Message sent
Message could not be sent
|