简体   繁体   English

intellij idea 仅针对所有未提交的更改运行测试

[英]intellij idea run test for all uncommitted changes only

At times we have ~100 java files in uncommitted changes, result of a big refactoring.有时我们有大约 100 个未提交更改的 java 文件,这是大重构的结果。 Some of those are test files as well.其中一些也是测试文件。

I have 2 related questions here:我在这里有两个相关的问题:

  1. Is there any way I can run tests for all uncommitted test files ?有什么办法可以为所有未提交的测试文件运行测试吗?
  2. Is there any way I can run tests for uncommitted test files as well as tests of my uncommitted source files ?有什么方法可以对未提交的测试文件以及未提交的源文件进行测试吗?

IntelliJ IDEA 没有在“未提交的文件”范围内运行测试的工具。

There is Changed Files predefined scope in Project tool window you can use to view all vcs changed files. 项目工具窗口中Changed Files预定义范围,您可以使用它来查看所有 vcs 更改的文件。 From there select all JUnit classes and from the context menu create JUnit Run/Debug Configuration which will fill the classes pattern to run automatically.从那里选择所有 JUnit 类并从上下文菜单中创建 JUnit 运行/调试配置,它将填充类模式以自动运行。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM