-
Notifications
You must be signed in to change notification settings - Fork 72
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
WIP: Generate xUnit Reports for e2e tests #962
base: master
Are you sure you want to change the base?
WIP: Generate xUnit Reports for e2e tests #962
Conversation
Hi @sawood14012. Thanks for your PR. I'm waiting for a codeready-toolchain member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sawood14012 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
Thanks for taking a look at this 🙏
I'm not familiar with go-junit-report
but don't you need to pipe it to the go test ./...
command as explained here:
go test -v 2>&1 ./... | go-junit-report -set-exit-code > report.xml
Co-authored-by: Francisc Munteanu <fmuntean@redhat.com>
it gets piped if you see my generate-report command and execute-tests cmd |
Co-authored-by: Francisc Munteanu <fmuntean@redhat.com>
Co-authored-by: Francisc Munteanu <fmuntean@redhat.com>
Quality Gate passedIssues Measures |
@@ -163,7 +165,8 @@ execute-tests: | |||
@echo "Status of ToolchainStatus" | |||
-oc get ToolchainStatus -n ${HOST_NS} -o yaml | |||
@echo "Starting test $(shell date)" | |||
MEMBER_NS=${MEMBER_NS} MEMBER_NS_2=${MEMBER_NS_2} HOST_NS=${HOST_NS} REGISTRATION_SERVICE_NS=${REGISTRATION_SERVICE_NS} go test ${TESTS_TO_EXECUTE} -run ${TESTS_RUN_FILTER_REGEXP} -p 1 -parallel ${E2E_PARALLELISM} -v -timeout=90m -failfast || \ | |||
$(MAKE) check-go-junit-report |
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 should be executed only for tests running in openshift-ci
@command -v ./go-junit-report >/dev/null 2>&1 || { echo "go-junit-report is not installed. Installing..."; GOBIN=$(PWD) go install github.com/jstemmer/go-junit-report/v2@latest; } | ||
@echo "go-junit-report version:" && ./go-junit-report -version |
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 would rather avoid installing the binary in the folder of the repository - let's install it either in /tmp folder or somewhere else.
@@ -163,7 +165,8 @@ execute-tests: | |||
@echo "Status of ToolchainStatus" | |||
-oc get ToolchainStatus -n ${HOST_NS} -o yaml | |||
@echo "Starting test $(shell date)" | |||
MEMBER_NS=${MEMBER_NS} MEMBER_NS_2=${MEMBER_NS_2} HOST_NS=${HOST_NS} REGISTRATION_SERVICE_NS=${REGISTRATION_SERVICE_NS} go test ${TESTS_TO_EXECUTE} -run ${TESTS_RUN_FILTER_REGEXP} -p 1 -parallel ${E2E_PARALLELISM} -v -timeout=90m -failfast || \ | |||
$(MAKE) check-go-junit-report | |||
MEMBER_NS=${MEMBER_NS} MEMBER_NS_2=${MEMBER_NS_2} HOST_NS=${HOST_NS} REGISTRATION_SERVICE_NS=${REGISTRATION_SERVICE_NS} go test ${TESTS_TO_EXECUTE} -run ${TESTS_RUN_FILTER_REGEXP} -p 1 -parallel ${E2E_PARALLELISM} -v -timeout=90m -failfast 2>&1 | $(MAKE) generate-report REPORT_NAME=${REPORT_NAME} || \ |
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.
you cannot use the pipe for the whole output; otherwise, we will lose the content/output of the tests when running it locally as well as in openshift-ci
a Wip PR which enables generation of junit/xunit reports to connect report-portal and Quality dashboard