-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Test Results Summary for compatibility tests #53
Add Test Results Summary for compatibility tests #53
Conversation
f6853db
to
d677beb
Compare
d692e1a
to
14cb17c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great to me. Thanks for improving the test result summary.
I wait for @vuil to take a look at this PR before we merge this pr to get his opinion as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! Very nice look.
A couple of comments:
- if you run
make modules
one of thego.sum
file is not up-to-date - Would it be possible to work the output to avoid putting the big red X when there are 0 failures?
|
||
- name: Build Runtime Test Plugins | ||
run: make build-compatibility-test-plugins | ||
|
||
- name: Run Compatibility Tests | ||
run: make run-compatibility-tests | ||
run: cd ./test/compatibility/framework/compatibilitytests && ginkgo --keep-going --race -r -v --randomize-all --trace --output-dir ./../../../../testresults --json-report=compatibility-tests.json > /tmp/out && { cat /tmp/out | grep -Ev 'STEP:|seconds|.go:'; rm /tmp/out; } || { exit_code=$?; cat /tmp/out | grep -Ev 'STEP:|seconds|.go:'; rm /tmp/out; exit $exit_code; } | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a bit of duplication here and with the make run-compatibility-tests
target. Was replacing the make target here just for testing, or is it the final iteration because it needs to do different things than the make target?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed the duplication using the same target
- name: Tests Results Summary | ||
if: always() | ||
run: | | ||
chmod +x ./hack/scripts/process-ginkgo-test-results.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this? Isn't the script checked-in as executable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer needed. Updated the script
echo "| $suite_description | $suite_tests | :white_check_mark: $suite_passed | :x: $suite_failed |" | ||
else | ||
echo "| $suite_description | $suite_tests | :white_check_mark: $suite_passed | :x: $suite_failed |" | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see you were planning on having a different behaviour when there was no suite_failed, but the echo is the same for both cases. Was that intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initial thought was to show slight different on failed. maybe be we could exclude the X icon if no failures. Updated accordingly
echo "| **Total** | $total_tests | :white_check_mark: $total_passed | :x: $total_failed |" | ||
else | ||
echo "| **Total** | $total_tests | :white_check_mark: $total_passed | :x: $total_failed |" | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too the echo's are both the same, was that intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initial thought was to show slight different on failed. maybe be we could exclude the X icon if no failures. Updated accordingly
54d5a11
to
d9e9149
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!! LGTM!
Couple of comments added.
|
||
# Print the suite row with color and icon depending on the result | ||
if [ "$suite_failed" -eq 0 ]; then | ||
echo "| $suite_description | $suite_tests | :white_check_mark: $suite_passed | $suite_failed |" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks you are not add X (red color) if no failures in the suite, but in the output attached in the PR description has X (red color) even there are no failures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the images to reflect the results with changes
json=$(cat "$1") | ||
|
||
# Print the table header | ||
echo "| :memo: Test Suite Description | Total Tests | :white_check_mark: Passed | :x: Failed |" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion, how about not adding X (red color) on the header next to Failed, add X (red color) to the results which has some failures!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So were the changes updated? If so, might be good to update the screenshots in the description with the latest output.
Nit: my similar comment is I don't find the emoticons add much to aid comprehending the results; I would even say they are rather distracting tbh. It might be sufficient to highlight when some tests fail, and leave the rest of the tabular data rather plain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Updated the images to reflect the results with changes. I have remove the green check and kept red X only if there are any failures
16c0098
to
26a5af9
Compare
bad9c9a
to
b010eb6
Compare
Makefile
Outdated
@@ -136,9 +139,7 @@ build-compatibility-test-plugins: ## Builds all runtime compatibility test plugi | |||
cd ./test/compatibility/testplugins/runtime-test-plugin-v0_28_0 && ${GO} mod tidy && GOOS=$(OS) GOARCH=$(ARCH) ${GO} build -o ../bin | |||
cd ./test/compatibility/testplugins/runtime-test-plugin-latest && ${GO} mod tidy && GOOS=$(OS) GOARCH=$(ARCH) ${GO} build -o ../bin | |||
|
|||
## The below command runs the compatibility tests using ginkgo and filter the logs as per regex and exit code with '0' representing success and non-zero values indicating test failures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
single # is sufficient. ## is convention for the make help
, not relevant here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vuil Made the changes
b010eb6
to
c430950
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
* Add GitHub Summary to present compatibility test results and filter the test script logs * Bump ginkgo and gomega versions * Remove icons to table data * Update the compatibility test command and description
What this PR does / why we need it
Which issue(s) this PR fixes
Fixes #
Describe testing done for PR
Filtered logs in Github workflow
New Test Results Summary section in the bottom section of the workflow
When a user clicks on the badge displayed in the root README, they will be directed to the workflow runs on the main branch. By selecting the most recent run, they can view the Test Results Summary.
Tested
make run-compatibility-tests
and exit code with '0' representing success and non-zero values indicating test failuresRelease note
Additional information
Special notes for your reviewer