Eclipse:模拟测试平台

发布于 2024-07-19 22:40:45 字数 344 浏览 1 评论 0原文

我正在开发一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

赴月观长安 2024-07-26 22:40:45

这将是一项繁重的工作,因为您无法重用大部分原始代码(其中充满了许多用于运行时数据的 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文