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 support for maven.test.redirectTestOutputToFile #78

Merged
merged 2 commits into from
Jul 3, 2022

Conversation

metteo
Copy link
Contributor

@metteo metteo commented Sep 1, 2020

Hi

This change will make the build logs shorter for cases when the tests produce lots of logs.
Please review.

Details:

  • disable ANSI codes if enabled
  • allow customization of the output file name
  • fix IT verify scripts to catch empty line case
  • upgrade java version to 8 (build was failing)
  • IT which verifies output is redirected
  • move release related pom configuration to a dedicated profile
  • fixed warnings related to javadoc annotations (spanScaleFactor)
  • run maven verify on push

Regards
Greg

@cla-bot
Copy link

cla-bot bot commented Sep 1, 2020

Hi @metteo, we require contributors to sign our Contributor License Agreement, and we don't have yours on file. In order for us to review and merge your code, please access https://www.artima.com/cla/choose-type to sign our Contributor License Agreement. Your effort is highly appreciated. Thank you.

@artimasites
Copy link

@cla-bot[bot] check

@cla-bot cla-bot bot added the cla-signed label Sep 1, 2020
@cla-bot
Copy link

cla-bot bot commented Sep 1, 2020

The cla-bot has been summoned, and re-checked this pull request!

@metteo
Copy link
Contributor Author

metteo commented Sep 1, 2020

@katrinsharp FYI

@metteo
Copy link
Contributor Author

metteo commented Sep 2, 2020

@cheeseng do you process PRs or should I ask someone else?

@cheeseng
Copy link
Contributor

cheeseng commented Sep 5, 2020

@metteo Er, I don't work on this repo much, perhaps @katrinsharp ?

@metteo
Copy link
Contributor Author

metteo commented Sep 5, 2020

@cheeseng thanks for the response. I already called @katrinsharp but she didn't respond. Maybe @bvenners could help?

@metteo metteo force-pushed the redirect-test-output-to-file branch from e92d4cf to 1de74e3 Compare September 5, 2020 10:25
@katrinsharp
Copy link
Collaborator

@cheeseng thanks for the response. I already called @katrinsharp but she didn't respond. Maybe @bvenners could help?

Sorry, was sidetracked by some stuff. I'll review, merge and build this week.

@metteo
Copy link
Contributor Author

metteo commented Sep 15, 2020

No problem. I expected that you will need some time to process the PR. Just got a little worried that I didn't get any response mentioning it will be processed in foreseeable future 😁

@katrinsharp
Copy link
Collaborator

Hi @metteo Thank you for submitting your PR. Does your PR need any updates to main README? Any build instructions that would be useful?

@metteo
Copy link
Contributor Author

metteo commented Sep 21, 2020

Release related plugins are in separate release profile. If you use release plugin it is activated automatically, otherwise you need to use -Prelease on the command line.

@metteo
Copy link
Contributor Author

metteo commented Sep 21, 2020

Using JDK newer than 8 might be tricky together with current maven compiler setup (source=8, target=8 instead of release=8). That's why github action I added is using JDK 8 for CI.

@metteo
Copy link
Contributor Author

metteo commented Sep 22, 2020

Should I update the README with above info?

@metteo
Copy link
Contributor Author

metteo commented Oct 9, 2020

@katrinsharp any updates?

@katrinsharp
Copy link
Collaborator

@katrinsharp any updates?

My apologies, yes. Please resolve conflicts as I've merged another PR, and I'll publish a new version this weekend. Thank you!

@metteo metteo force-pushed the redirect-test-output-to-file branch from 1de74e3 to cef20bb Compare October 19, 2020 15:58
@metteo
Copy link
Contributor Author

metteo commented Oct 19, 2020

@katrinsharp PR rebased.

 - disable ANSI codes if enabled
 - allow customization of the output file name
 - fix IT verify scripts to catch empty line case
 - upgrade java version to 8
 - IT which verifies output is redirected
@metteo metteo force-pushed the redirect-test-output-to-file branch from cef20bb to 5068778 Compare November 8, 2020 19:13
@metteo
Copy link
Contributor Author

metteo commented Nov 8, 2020

@katrinsharp I saw you merged another PR so I rebased this one to resolve conflicts.

I would expect this gets merged next. If you are hesitant in merging, please let me know why so I can apply appropriate changes.

@katrinsharp
Copy link
Collaborator

@metteo I'd like to go over your PR once again to make sure it is good-to-go and then will merge. Please stay tuned. Thank you.

@cheeseng
Copy link
Contributor

cheeseng commented Jul 1, 2022

@bvenners I went through the PR changes and tested run the integration test with:

> mvn clean integration-test

and when I go into target/it/redirect-output/target/scalatest-reports I can see the scalatest-output.txt which contains the following:

Discovery starting.
Discovery completed in 68 milliseconds.
Run starting. Expected test count is: 1
AppTest:
Our example App
- should run
Run completed in 108 milliseconds.
Total number of tests run: 1
Suites: completed 2, aborted 0
Tests: succeeded 1, failed 0, canceled 0, ignored 0, pending 0
All tests passed.

Seems working great, @bvenners please review and consider approving so I can go ahead and merge this.

Thanks!

@cheeseng cheeseng requested a review from bvenners July 1, 2022 08:59
@metteo
Copy link
Contributor Author

metteo commented Jul 1, 2022

@cheeseng please try mvn clean verify instead. integration-test phase executes failsafe plugin but it doesn't verify if tests failed or succeeded (the results are in a file to allow post-integration-test phase to complete). That's what the github action does anyways ;)

@cheeseng cheeseng merged commit 64b4f61 into scalatest:master Jul 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants