简体   繁体   English

使用-parameters javac选项使IntelliJ IDEA运行JUnit测试

[英]Make IntelliJ IDEA run JUnit tests with -parameters javac option

Is there a way to ensure the -parameters option is passed whenever running JUnit tests from IntelliJ IDEA? 有没有办法确保从IntelliJ IDEA运行JUnit测试时传递-parameters选项?
If it's impossible to set globally, it would even help to set it for specific Run/Debug configurations. 如果不可能全局设置,它甚至可以帮助为特定的运行/调试配置设置它。

The -parameters option is a Java compiler option, so it affects how the code is compiled, not how it is run. -parameters选项是Java编译器选项,因此它会影响代码的编译方式,而不会影响代码的运行方式。 You can add it in Settings | 您可以在“设置”中添加它 Build, Execution, Deployment | 构建,执行,部署| Compiler | 编译器| Java Compiler | Java编译器| Additional command line parameters. 其他命令行参数。

是的,你可以这样做:

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

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