Eclipse:模拟测试平台
我正在开发一个 Eclipse 插件并对其进行测试。 有些是常规 JUnit 测试,有些是 PDE 测试(即需要启动 eclipse 实例才能访问 eclipse 内部)。
我想知道通过为平台创建模拟对象来尝试将一些 PDE 测试转变为常规测试是否是一个好主意。 这将是大量工作,但我认为这会节省时间,因为测试运行得更快,而且我们还可以使用 Infinitest 进行更多测试。
我将不胜感激任何反馈,以便我可以决定如何继续。
提前致谢!
此致, 弗拉德
I am developing an Eclipse plugin and have tests for it. Some are regular JUnit tests, some are PDE tests (i.e. require starting an eclipse instance to be able to access eclipse internals).
I wonder if it would be a good idea to try to turn some of the PDE test into regular tests, by creating mock objects for the platform. It would be a lot of work, but I think it would save time because the tests will run faster and we will also be able to use Infinitest for more tests.
I would appreciate any feedback, so that I can make up my mind about how to proceed.
Thanks in advance!
best regards,
Vlad
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这将是一项繁重的工作,因为您无法重用大部分原始代码(其中充满了许多用于运行时数据的
private final static
,您无法摆脱也无法访问这些数据)它)。我建议尝试一下。 如果看起来可行,您可以实现您的插件所需的内容,然后将结果交给 Eclipse 社区进行扩展。
It will be a lot of work since you can't reuse much of the original code (which is riddled with lots of
private final static
for runtime data which you can't get rid of nor can you access it).I suggest to give it a try. If it seems feasible at all, you can implement what you need for your plugin and then hand the result over to the Eclipse community to extend.