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

scoverage doesn't work properly when scalatest is a separate task #77

Closed
scr-oath opened this issue Aug 1, 2018 · 5 comments
Closed

Comments

@scr-oath
Copy link

scr-oath commented Aug 1, 2018

If you use the property: com.github.maiflai.gradle-scalatest.mode = append to enable running scalatest and java test framework (testNG, e.g.) then scoverage doesn't report anything.

@scr-oath
Copy link
Author

scr-oath commented Aug 1, 2018

@maiflai
Copy link
Contributor

maiflai commented Aug 31, 2018

thanks - I'll have a think about how to enable this to work properly

@maiflai
Copy link
Contributor

maiflai commented Dec 28, 2018

Sorry, on review I can't spot where a problem would appear (from the gradle-scoverage perspective).

As you say, running gradle-scalatest in append mode means that the testScoverage task should be run using the default Gradle test runner i.e. JUnit.

Are you saying that you want gradle-scalatest to run testScoverage because all your Scala modules are using ScalaTest?

If so, I think you might try this within a Scala module:

com.github.maiflai.ScalaTestPlugin.configure(
  tasks.test, 
  new com.github.maiflai.BackwardsCompatibleJavaExecActionFactory(gradle.gradleVersion)
)

Can you provide a project that I can take a look at?

Thanks,
Stu.

@scr-oath
Copy link
Author

scr-oath commented Jan 2, 2019

Hi - I haven't looked at this in a while either… I'll close this for now, and if I can reproduce when trying to get both test frameworks working again, I'll send you a reduced gist as example.

@scr-oath scr-oath closed this as completed Jan 2, 2019
@Coobik
Copy link

Coobik commented Feb 20, 2019

hi all!
is there a solution how to run coverage on both legacy tests (gradle test) AND scalatest tests (gradle scalatest)?
thanks!

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

3 participants