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

Build Tooling: Collapse or omit successful test results from Travis build #16744

Closed
aduth opened this issue Jul 24, 2019 · 5 comments · Fixed by #16755
Closed

Build Tooling: Collapse or omit successful test results from Travis build #16744

aduth opened this issue Jul 24, 2019 · 5 comments · Fixed by #16755
Assignees
Labels
[Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. [Type] Build Tooling Issues or PRs related to build tooling [Type] Task Issues or PRs that have been broken down into an individual action to take
Milestone

Comments

@aduth
Copy link
Member

aduth commented Jul 24, 2019

In order to reduce contributor friction resulting from a failing build, we should seek to keep build results as actionable as possible. A failing Jest build is difficult to decipher because it includes potentially thousands of passing test cases. In these situations, usually only the failed test is relevant for the contributor.

Example: https://travis-ci.com/WordPress/gutenberg/jobs/211276270

Task: Logging for successful tests should be silenced or collapsed.

Relevant Details:

  • Travis internally uses special prefixes for its own logging collapsing, travis_fold:start:FOO and travis_fold:end:FOO (example). These could be used for collapsing log output of the successful test cases.
  • PHPUnit tests "show" all tests run, but simply display a "." dot character for the successful tests (example)
  • At a glance, Jest CLI options don't appear to support this use-case, but we could use a custom reporter to customize the output (e.g. jest-silent-reporter, jest-simple-dot-reporter)
@aduth aduth added [Type] Task Issues or PRs that have been broken down into an individual action to take [Type] Build Tooling Issues or PRs related to build tooling [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. labels Jul 24, 2019
@epiqueras epiqueras assigned epiqueras and unassigned epiqueras Jul 24, 2019
@epiqueras
Copy link
Contributor

https://github.com/rickhanlonii/jest-silent-reporter works well. Should we just add that?

@aduth
Copy link
Member Author

aduth commented Jul 25, 2019

https://github.com/rickhanlonii/jest-silent-reporter works well. Should we just add that?

It seems like a good option.

@epiqueras
Copy link
Contributor

A folding one would be better, but I can't find one.

@aduth
Copy link
Member Author

aduth commented Jul 25, 2019

A folding one would be better, but I can't find one.

It's maybe needlessly complex, but there might be something with:

  1. Use jest-standard-reporter to partition logging between stdout and stderr
  2. Redirect outputs to two files for stdout and stderr
  3. Echo the contents of stdout file between the Travis start and end tags for folding
  4. Echo the contents of stderr file outside/after the folded success output
  5. Delete the files

@epiqueras
Copy link
Contributor

I'd rather build a reporter that does that instead of hacking it in a script that creates files.

@epiqueras epiqueras self-assigned this Jul 25, 2019
@epiqueras epiqueras added this to the Future milestone Jul 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. [Type] Build Tooling Issues or PRs related to build tooling [Type] Task Issues or PRs that have been broken down into an individual action to take
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants