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

Keep test console output when junit output is used #108

Merged
merged 2 commits into from
Aug 1, 2024

Conversation

emdash-ie
Copy link
Contributor

Before now, scalatest’s output was never sent to standard out: the default behaviour when passing the “-u” flag is to omit it. This is a bit irritating when running locally, because it makes it hard to tell which tests have failed.

This commit changes the behaviour to always send scalatest’s output to standard out, as well as writing to junit files.

This lets us keep the benefits of the XML output in CI (annotations pointing to the source files), while making the tests more useful when run locally.

This PR is a copy of the changes @fredex42 and I made to crier in https://github.com/guardian/crier/pull/174 (specifically commit https://github.com/guardian/crier/commit/59206fae5b65b5ece9b83df65f1b3bcba1637155)

@emdash-ie emdash-ie requested a review from a team as a code owner August 1, 2024 10:22
build.sbt Outdated Show resolved Hide resolved
build.sbt Outdated Show resolved Hide resolved
emdash-ie and others added 2 commits August 1, 2024 11:49
Before now, scalatest’s output was never sent to standard out: the
default behaviour when passing the “-u” flag is to omit it. This is a
bit irritating when running locally, because it makes it hard to tell
which tests have failed.

This commit changes the behaviour to always send scalatest’s output to
standard out, as well as writing to junit files.

This lets us keep the benefits of the XML output in CI (annotations
pointing to the source files), while making the tests more useful when
run locally.
It’s shorter and neater!

Co-authored-by: Roberto Tyley <52038+rtyley@users.noreply.github.com>
Copy link
Member

@rtyley rtyley left a comment

Choose a reason for hiding this comment

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

Nice one!

@emdash-ie emdash-ie merged commit ba81e5b into main Aug 1, 2024
1 check passed
@emdash-ie emdash-ie deleted the improve-test-output branch August 1, 2024 11:12
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.

2 participants