Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有以下问题。
我想用 JSFUnit 测试我的 JSF 应用程序。但是 JSFUnit 仅支持 junit3(我们所有的单元测试都使用 JUnit4 运行)。
是否可以在 pom.xml 中包含两个具有不同范围的 junit 依赖项(junit4 和 junit3)?
请提前帮助和thanx
如果你把项目分成两个子模块,一个需要JUnit3,一个需要JUnit4,你可以在子pom.xml中分别指定测试依赖。
正如 Péter 所说,您应该将项目拆分为单独的模块。在这种情况下,我还看到使用专用测试模块产生了很好的结果。
这样,您在 foo-web 中的 JUnit4 测试依赖项对于从 foo-web-jsf-tests 运行的测试是不可见的。