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.
我正在使用pit 1.6.7,我想使用JUnit 4.12,但看起来pit 总是使用junit 3.8.1,即使junit 4.12 在依赖项中。
如何强制 PIT 在 maven pom 文件中使用 junit 4.12。
PIT 将使用被测代码使用的 junit 版本。为什么你认为它使用的是 3.8.1?
您的 pom 将 junit "4.12-soneya" 的非标准分支声明为依赖项。我看不出这不起作用的原因,但您可能希望尝试使用标准的 junit 4.12 并首先查看是否正确解决了您的问题。
与您的问题无关,除非您有充分的理由这样做,否则您不应启用所有 mutators,坚持使用默认值或更强。如果您使用最新版本的pitest(1.7.1),您也会有更好的体验。