简体   繁体   English

更改后运行单元测试不会在 IntelliJ 中运行更新的测试

[英]Running a unit test after changing it does not run the updated test in IntelliJ

This is super weird and only happens for one of my modules in my project.这太奇怪了,只发生在我项目中的一个模块中。

If I change the name of a test, then right click and run the test, it will say No tests found matching Method: newName.如果我更改了一个测试的名称,然后右键单击并运行该测试,它会说没有找到匹配的测试方法:newName。 It is effectively trying to run the old test, instead of the new one, despite the fact I'm not re-running the same Run Configuration - I'm right clicking and running the freshly edited test.它有效地尝试运行旧测试,而不是新测试,尽管事实上我没有重新运行相同的运行配置 - 我右键单击并运行新编辑的测试。

What could be causing this?什么可能导致这种情况?

折断

In Run Configuration, add Build Project so that it picks up latest changes在 Run Configuration 中,添加 Build Project 以获取最新更改

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么 Intellij 单元测试视图显示的运行时间比运行测试的实际挂钟时间短得多? - Why does Intellij unit test view show a much shorter run time than actual wall clock time of running tests? 当某些模块没有编译时,如何在IntelliJ中运行单元测试? - How to run unit test in IntelliJ when some modules are not compiling? 如何测量从 Maven 或 Intellij 运行的单元测试的启动时间? - How to mesure startup time of a unit test run from maven or intellij? 使用 IntelliJ 运行 JUnit 测试 - Run JUnit test with IntelliJ Intellij 测试运行历史记录 - Intellij test run history 用于单独测试的 grails 中的 Spock 单元测试在 intellij 中不起作用 - Spock unit tests in grails for individual test does not work in intellij Maven:单元测试未运行 - Maven: Unit test not running 运行mvn集成测试不会运行robotframework测试用例 - Running mvn integration-test does not run robotframework test cases 创建新的Mule Connector后,无法在IntelliJ中运行验收测试 - Unable to run acceptance test in IntelliJ after creating a new Mule Connector Selenium,Maven,Jenkins:更新的/ new测试用例不会通过eclipse运行。 更改仅在运行Jenkins的脚本后出现 - Selenium, Maven, Jenkins: Updated /new test cases do not run through eclipse. The changes only appeared after running the script from Jenkins
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM