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

Kaocha cloverage plugin doesn't create reports when used with kaocha.repl/run #16

Open
mchughs opened this issue Aug 11, 2021 · 2 comments

Comments

@mchughs
Copy link

mchughs commented Aug 11, 2021

I have created a project below which minimally illustrates the issue. Please check it out and try running the two aliases.

https://github.com/mchughs/kaocha-cloverage-fail-example

Essentially something like -m kaocha.runner --plugin cloverage works just fine to run tests and create a report.

But trying (kaocha.repl/run 'core-test {:plugins [:kaocha.plugin/cloverage]}) will just run the test without creating a report.

My interest in having this work is that I am following Juxt's example to get parallel testing out of kaocha and CircleCI as described at https://www.juxt.pro/blog/parallel-kaocha.

They use kaocha.repl/run in their example and I obviously don't want to have to run all my tests again just to produce a coverage report since the whole point of parallelization is to speed things up.

@mchughs mchughs changed the title Kaocha cloverage plugin doesn't create reports when used with with kaocha.repl/run Kaocha cloverage plugin doesn't create reports when used with kaocha.repl/run Aug 11, 2021
@plexus
Copy link
Member

plexus commented Sep 14, 2021

The cloverage plugin works a little different from other plugins, it implements that main hook, which fires right before we actually run the tests. It then takes over controls, hands it over to cloverage, and lets cloverage in turn invoke Kaocha again. In the end it throws a early-exit exception to stop Kaocha from running the tests again.

This main hook is not implemented in kaocha.repl/run. It would be a little hard to do while still maintaining the contract of kaocha.repl/run.

We don't recommend the approach that Juxt describes, Kaocha is getting its own first class parallelization support instead. We encourage you to try that out. See lambdaisland/kaocha#234

@mchughs
Copy link
Author

mchughs commented Sep 14, 2021

Hi, clear. I look forward to the new first class parallelization ! I'll see when it's released how it interacts with the coverage plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Won't fix
Development

No branches or pull requests

2 participants