eCobertura and dbunit don't find persistence.xml for tests
Asked Answered
H

0

8

I have a couple of dbunit-tests for a jee5-project. They work great when I try to run them with "run as TestNG test" in Eclipse. But when I try to run them as "Cover as TestNG test" they fails with the error "javax.persistence.PersistenceException: No Persistence provider for EntityManager named test".

To me it seems like the "Cover as.." attempt to run the tests with the wrong persistence.xml, eg not using the one in src/test/resources/META-INF but rather src/main/resources/META-INF (or no one at all).

Is there a way to tell cobertura that it needs the files in src/test/resources to run the tests?

Should I report a bug to the eCobertura-developers?

Horten answered 10/6, 2013 at 6:20 Comment(3)
Reporting a bug might be best option, can you give a full stack trace?Gerhardine
there is old bug: cobertura.996293.n3.nabble.com/…Richardo
I would log this to the cobertura issues page: github.com/cobertura/cobertura/issuesRosenberg

© 2022 - 2024 — McMap. All rights reserved.