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

How to provide scalatest options in gradle-scalatest #70

Open
h-ngo opened this issue Nov 15, 2018 · 6 comments
Open

How to provide scalatest options in gradle-scalatest #70

h-ngo opened this issue Nov 15, 2018 · 6 comments

Comments

@h-ngo
Copy link

h-ngo commented Nov 15, 2018

We want to experiment with some flag options to configure scalatest reporter (http://www.scalatest.org/user_guide/using_the_runner, "Configuring reporters").

How do we provide these options to gradle-scalatest?

@maiflai
Copy link
Owner

maiflai commented Nov 15, 2018

The plugin tries to respect the gradle test logging configuration by manipulating the reporters, so this is not really something that is publicly exposed.

What sort of configuration are you thinking of?

@h-ngo
Copy link
Author

h-ngo commented Nov 15, 2018

Right now we are trying to reduce the noise in console output while running the test by only display failed tests.

e.g.

  • should should be able to fan out and fan in (56 milliseconds)
  • should should be able to execute flows in parallel (204 milliseconds)
  • should should execute complex dependency scenarios *** FAILED *** (95 milliseconds)

We just want the third failed test to be displayed. We want to pass in -oC options to see if it helps. We have tried, testLogging { events = ['FAILED'] }, but it doesn't work

@maiflai
Copy link
Owner

maiflai commented Nov 15, 2018

That's odd - #66 suggests that it should work.

What does the rest of the build file look like? Which version of the plugin are you using?

@maiflai
Copy link
Owner

maiflai commented Nov 15, 2018

You might try applying this to all test tasks?

tasks.withType(Test) {
  testLogging { 
    events = ['FAILED'] 
  }
}

@h-ngo
Copy link
Author

h-ngo commented Nov 16, 2018

Yeah. that's exactly what we applied. our test setup is a bit complicated cuz we used scalatest to test both Java and Scala codes. that block only works for tests against Java, not Scala. Perhaps, the setting is not correct. Will try again and update here.

We are using gradle-scalatest 0.16

@maiflai
Copy link
Owner

maiflai commented Nov 18, 2018

Ok - I don't think there's anything in later releases of the plugin that would specifically affect this.

The block above should work for both; although I'm not certain about the details of testScoverage when handling a Java-only project.

If you could share a simple reproduction project that would help enormously.

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

No branches or pull requests

2 participants