通过范围测试避免 Maven 循环依赖
我有下一个问题。 “A”库包含自定义 JSF 组件。 “B”库包含这些自定义组件和其他一些组件(Primefaces JSF 组件)的 Selenium 测试。
当我开发“A”时,我想使用“B”测试任何更改,以检查我是否破坏了某些内容。因此,“A”在测试范围内需要“B”依赖项。
当我开发“B”时,我想使用“A”测试任何更改,以便在测试时动态部署网站,以检查我是否破坏了某些内容。因此,“B”在测试范围内需要“A”依赖项。
那么,如何避免循环依赖并实现我的目标的最佳方法呢?
I have the next problem. "A" library contains custom JSF components. "B" library contains Selenium tests for these custom components, and some others (Primefaces JSF components).
When I develop "A", I want to test any change using "B" in order to check if I've broken something. So "A" needs "B" dependency in test scope.
When I develop "B", I want to test any change using "A" for deploying a website on the fly at testing-time in order to check if I've broken something. So "B" needs "A" dependency in test scope.
So, How is the best way to avoid the cyclic dependency and get my goal?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能必须在以下两者之间进行选择:
使用“A 应用程序”(例如应用程序)进行 B 测试,但应用程序根本不是 A,以避免 A 出现在 B 部门中。
有一个新的 C 测试模块,其中 A 和 B 作为依赖项。 C 正在用 A 测试 B。但是这种情况开始变得不太容易维护......
一般来说,除非您的工具制作了一些复杂的东西,否则您不需要测试您的测试工具。在这种情况下,我做了一些自治的小型测试集。
you may have to choose between:
having B tests with "A app" like app but an app that is not A at all to avoid having A in B dep.
having a new C test module that have A and B as dependencies. Where C is testing B with A. But this case begin to be less easy to maintain...
In general you dont have the need to test your test tool except if your tool make some complex stuff. In this case I do some small test sets that are autonomous.