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

Add skipped to the message for skipped tests in human reports #2053

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

mrodm
Copy link
Contributor

@mrodm mrodm commented Aug 28, 2024

Currently, if there are skipped tests (e.g. system or pipeline tests), there is no reference in the output about that test is skipped:

--- Test results for package: elastic_package_registry - START ---
╭──────────────────────────┬─────────────┬───────────┬───────────┬─────────────────────────────────────────────────────────────┬──────────────╮
│ PACKAGE                  │ DATA STREAM │ TEST TYPE │ TEST NAME │ RESULT                                                      │ TIME ELAPSED │
├──────────────────────────┼─────────────┼───────────┼───────────┼─────────────────────────────────────────────────────────────┼──────────────┤
│ elastic_package_registry │ metrics     │ system    │ default   │ test [https://github.com/elastic/integrations/issues/10904] │     30.268µs │
╰──────────────────────────┴─────────────┴───────────┴───────────┴─────────────────────────────────────────────────────────────┴──────────────╯
--- Test results for package: elastic_package_registry - END   ---

This PR adds SKIPPED: to the message with the reason and link. Example:

--- Test results for package: elastic_package_registry - START ---
╭──────────────────────────┬─────────────┬───────────┬───────────┬──────────────────────────────────────────────────────────────────────┬──────────────╮
│ PACKAGE                  │ DATA STREAM │ TEST TYPE │ TEST NAME │ RESULT                                                               │ TIME ELAPSED │
├──────────────────────────┼─────────────┼───────────┼───────────┼──────────────────────────────────────────────────────────────────────┼──────────────┤
│ elastic_package_registry │ metrics     │ system    │ default   │ SKIPPED: test [https://github.com/elastic/integrations/issues/10904] │     13.583µs │
╰──────────────────────────┴─────────────┴───────────┴───────────┴──────────────────────────────────────────────────────────────────────┴──────────────╯
--- Test results for package: elastic_package_registry - END   ---

This does not change the XML output (xUnit):

<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
  <testsuite name="system" tests="1" skipped="1">
    <!--test suite for system tests-->
    <testcase name="system test: default" classname="elastic_package_registry.metrics" time="1.708e-05">
      <skipped message="test [https://github.com/elastic/integrations/issues/10904]"></skipped>
    </testcase>
  </testsuite>
</testsuites>

@mrodm mrodm requested a review from a team August 28, 2024 17:52
@mrodm mrodm self-assigned this Aug 28, 2024
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

cc @mrodm

@mrodm mrodm merged commit 9ca0918 into elastic:main Aug 29, 2024
3 checks passed
@mrodm mrodm deleted the add-skip-tag-tests branch August 29, 2024 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants