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

Improve Jest tests by showing running test file upon unexpected termination on Jenkins #59728

Open
watson opened this issue Mar 10, 2020 · 4 comments
Labels
Feature:Functional Testing Team:Operations Team label for Operations Team Team:QA Team label for QA Team

Comments

@watson
Copy link
Contributor

watson commented Mar 10, 2020

If a Jest test file exists unexpectedly on Jenkins, you don't see which file was running when the program exited:

image

Please ignore that you, in this case, could inspect the stack trace to gather which test-file was responsible. This isn't always possible due to the async nature of Node.js, or if there isn't any stack trace.

However, if you run the same test locally you'll see a RUNS line:

image

Here it's easy to see that the unexpected termination happened in src/cli/cluster/cluster_manager.test.ts.

Being able to see this when the tests run in Jenkins would be very helpful and remove a lot of wasted time spent recreating the issue.

@watson watson added the Team:QA Team label for QA Team label Mar 10, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-qa (Team:QA)

@LeeDr LeeDr added the Team:Operations Team label for Operations Team label Mar 12, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@spalger
Copy link
Contributor

spalger commented Mar 13, 2020

I'd love to fix this but we really have pretty minimal control over how Jest reports things. I think this makes the jest interface ultimately better, but you would probably have better luck reporting this to the Jest project.

@watson
Copy link
Contributor Author

watson commented Mar 13, 2020

As far as I understand it, this is configurable by changing or modifying the reporter that we use: https://jestjs.io/docs/en/configuration#reporters-arraymodulename--modulename-options

@tylersmalley tylersmalley added 1 and removed 1 labels Oct 11, 2021
@exalate-issue-sync exalate-issue-sync bot added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort labels Oct 12, 2021
@tylersmalley tylersmalley removed loe:small Small Level of Effort impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. EnableJiraSync labels Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Functional Testing Team:Operations Team label for Operations Team Team:QA Team label for QA Team
Projects
None yet
Development

No branches or pull requests

5 participants