我有一些针对jee5项目的dbunit测试.当我尝试在Eclipse中使用"run as TestNG test"运行它们时,它们工作得很好.但是当我尝试将它们作为"封面作为TestNG测试"运行时,它们会因错误而失败"javax.persistence.PersistenceException: No Persistence provider for EntityManager named test". 
对我来说,似乎"封面为......"尝试使用错误的persistence.xml运行测试,例如不使用src/test/resources/META-INF中的那个,而是使用src/main/resources/META-INF (或根本没有人).
有没有办法告诉cobertura它需要src/test/resources中的文件来运行测试?
我应该向eCobertura开发者报告错误吗?
我正在尝试为 Eclipse 安装 eCobertura 插件。在这样做时,我找到了更新站点http://ecobertura.johoop.de/update/。
但这对我不起作用,可能是由于某些防火墙问题。是否有我可以下载并安装为本地站点的捆绑包?
以下代码:
@Mock
private Appender mockAppender;
@Captor
private ArgumentCaptor<LoggingEvent> captorLoggingEvent;
...
verify(mockAppender, atLeastOnce()).doAppend(captorLoggingEvent.capture());
Run Code Online (Sandbox Code Playgroud)
作为 JUnit 测试正常运行,但使用 ecobertura 失败并显示以下消息:
Wanted but not invoked:
appender.doAppend(<Capturing argument>);...Actually, there were zero interactions with this mock.
Run Code Online (Sandbox Code Playgroud)
我正在使用 :
你能帮我解决这个问题吗?