Skip to content
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

OPCT-304: cmd: adm parser-junit #123

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mtulio
Copy link
Contributor

@mtulio mtulio commented Aug 30, 2024

Introduce a command to parse the JUnit files produced by e2e tests.

This is a helper when running openshift-tests manually, it will provide quickly access to the results without struggling with parsing the XML file with xq.

$ opct-devel adm parse-junit failed_tests_rerun/results/junit_e2e__20240827-213043.xml 
Summary:
- File: failed_tests_rerun/results/junit_e2e__20240827-213043.xml
- Total: 19
- Pass: 9
- Skipped: 0
- Failures: 10

JUnit Attributes:
- XMLName: { testsuite}
- Name: openshift-tests
- Tests: 19
- Skipped: 0
- Failures: 10
- Time: 2568
- Property: {TestVersion 4.14.0-202310201027.p0.g948001a.assembly.stream-948001a}

#> Passed tests (9): 
[sig-instrumentation] MetricsGrabber should grab all metrics slis from API server. [Suite:openshift/conformance/parallel] [Suite:k8s]
[sig-auth][Feature:UserAPI] users can manipulate groups [apigroup:user.openshift.io][apigroup:authorization.openshift.io][apigroup:project.openshift.io] [Suite:openshift/conformance/parallel]
[sig-cli] oc adm release extract image-references [Suite:openshift/conformance/parallel]
[sig-auth][Feature:OAuthServer] OAuth server has the correct token and certificate fallback semantics [apigroup:user.openshift.io] [Suite:openshift/conformance/parallel]
[sig-api-machinery][Feature:APIServer] anonymous browsers should get a 403 from / [Suite:openshift/conformance/parallel]
[sig-auth][Feature:OAuthServer] well-known endpoint should be reachable [apigroup:route.openshift.io] [apigroup:oauth.openshift.io] [Suite:openshift/conformance/parallel]
[sig-cli] oc basics can get version information from API [Suite:openshift/conformance/parallel]
[sig-arch] Managed cluster should only include cluster daemonsets that have maxUnavailable or maxSurge update of 10 percent or maxUnavailable of 33 percent [Suite:openshift/conformance/parallel]
[sig-arch] External binary usage

#> Failed tests (10): 
"[sig-instrumentation] Prometheus [apigroup:image.openshift.io] when installed on the cluster shouldn't report any alerts in firing state apart from Watchdog and AlertmanagerReceiversNotConfigured [Early][apigroup:config.openshift.io] [Skipped:Disconnected] [Suite:openshift/conformance/parallel]"
"[sig-network] Networking should provide Internet connection for containers [Feature:Networking-IPv4] [Skipped:Disconnected] [Skipped:Proxy] [Skipped:azure] [Suite:openshift/conformance/parallel] [Suite:k8s]"
"[sig-builds][Feature:Builds] oc new-app should succeed with a --name of 58 characters [apigroup:build.openshift.io] [Skipped:Disconnected] [Skipped:Proxy] [Suite:openshift/conformance/parallel]"
"[sig-builds][Feature:Builds] build can reference a cluster service with a build being created from new-build should be able to run a build that references a cluster service [apigroup:build.openshift.io] [Skipped:Disconnected] [Skipped:Proxy] [Suite:openshift/conformance/parallel]"
"[sig-auth][Feature:OpenShiftAuthorization][Serial] authorization TestAuthorizationResourceAccessReview should succeed [apigroup:authorization.openshift.io] [Suite:openshift/conformance/serial]"
"[sig-imageregistry][Feature:ImageInfo] Image info should display information about images [apigroup:image.openshift.io] [Skipped:Disconnected] [Suite:openshift/conformance/parallel]"
"[sig-cli] oc builds new-build [apigroup:build.openshift.io] [Skipped:Disconnected] [Suite:openshift/conformance/parallel]"
"[sig-network] services when running openshift ipv4 cluster ensures external ip policy is configured correctly on the cluster [apigroup:config.openshift.io] [Serial] [Suite:openshift/conformance/serial]"
"[sig-instrumentation][Late] OpenShift alerting rules [apigroup:image.openshift.io] should link to a valid URL if the runbook_url annotation is defined [Suite:openshift/conformance/parallel]"
"[sig-arch] External binary usage"

#> Skipped tests (0): 

It's useful when asking partners to replay tests / run openshift-tests manually. Example: https://issues.redhat.com/browse/OPCT-304

@openshift-ci openshift-ci bot requested review from faermanj and jcpowermac August 30, 2024 17:42
Copy link

openshift-ci bot commented Aug 30, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from mtulio. For more information see the Kubernetes Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mtulio mtulio added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 30, 2024
@mtulio mtulio force-pushed the feat-parser-junit branch 3 times, most recently from c9b4feb to acd0860 Compare August 30, 2024 17:59
Introduce the command 'opct adm parser-junit' to be used as a helper
when reviewing raw XML/JUnit files.
@@ -0,0 +1,121 @@
package api
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Crating the api package as this lib can be used by plugins too.
Should we need to place under api/junit directory creating a dedicated package?

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 31, 2024
@openshift-merge-robot
Copy link
Contributor

PR needs rebase.

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-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/CLI kind/feature Categorizes issue or PR as related to a new feature. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. target-release/opct-v0.6
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants