Urbanleg
Urbanleg

Reputation: 6532

JUnit and Spring - code coverage % is wrong when using multiple Threads in test

We tried to use a couple of code-coverage plugins for our spring project (EclEmma,Clover).

Both are providing wrong results regarding the coverage %.

The tests are using Spring's taskExecutor (thread pool).

All the code that the task executors threads executes does not count as covered.

Any ideas why?

Upvotes: 3

Views: 710

Answers (1)

Nguyen Quoc Tin
Nguyen Quoc Tin

Reputation: 41

I got the same issue. It seems that test coverage doesnt work well with multithreads.

Upvotes: 0

Related Questions