三叶草没有拾取某些物体
我注意到三叶草没有获取我所上的一门特定课程的结果。 它是一个域对象,有 3 个重载构造函数。
它在 Clover 报告中显示为 0% 覆盖率。 我什至编写了一个虚拟测试用例来测试所有构造函数、访问器方法等,但它仍然显示为具有 0% 覆盖率
同一包中的其他对象被 clover 完全拾取,
我需要做些什么来确保这一点物体被三叶草拾起?
谢谢 达米安
I noticed clover is not picking up results for 1 particular class that I have.
Its a domain object that has 3 overloaded constructors.
It shows up in the clover reports as having 0% coverage.
I even wrote a dummy test case to test all the constructors, accessor methods etc and it stilled showed up as having 0% coverage
Other objects in the same package are picked up perfectly ok by clover
is there anything I need to do to ensure that this object is picked up by clover?
Thanks
Damien
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保相关类的编译单元没有 CLOVER:OFF 指令,并检查以确保 Clover 正在检测类文件。
几年前,我对 Clover 有过一些使用经验,我记得有一个问题,即覆盖率数据写入得不够快。 Atlassian 团队的建议是在单独的 JVM 中分叉每个测试,而不是对它们进行批处理。
例如,这可能只是 Clover 仪器中的一个错误。根据我的经验,团队的反应非常灵敏;可能值得检查他们的论坛。
Ensure that the compilation unit of the relevant class doesn't have a CLOVER:OFF directive, and check to make sure the classfile is being instrumented by Clover.
A couple of years ago, I had a small amount of experience with Clover, and I remember having a problem whereby the coverage data wasn't being written quickly enough. Recommendation from the Atlassian team was to fork each test in a separate JVM, rather than batch them.
It could simply be a bug in Clover's instrumentation, for example. In my experience the team is pretty responsive; might be worthwhile to check on their forums.