本文介绍了使用JUnit配置IntelliJ IDEA以进行单元测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我决定今天早上通过试用版试用IntelliJ并安装了JUnit插件。我创建了一个新的Java项目,我想为它编写一个测试用例。
I decided to try out IntelliJ this morning via the trial version and installed the JUnit plugin. I made a new Java project and I want to write a test case for it.
如何将junit.jar文件添加到我的项目中? (我实际上想把它添加到每个java项目中,现在和永远更多 - 有没有办法做到这一点?)。
How do I add the junit.jar file to my project? (I actually want to add it to every java project, now and forever more - is there a way of doing that?).
推荐答案
在代码编辑器中按 + + 。
它会显示弹出窗口,提示创建测试。
Press ++ in the code editor.It will show you popup with suggestion to create a test.
Mac OS: + +
Mac OS: ++
这篇关于使用JUnit配置IntelliJ IDEA以进行单元测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!