Configuring IntelliJ IDEA for unit testing with JUnit

前端 未结 5 1175
刺人心
刺人心 2020-11-28 01:40

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.

Ho

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-28 02:25

    One way of doing this is to do add junit.jar to your $CLASSPATH as an external dependency.

    So to do that, go to project structure, and then add JUnit as one of the libraries as shown in the gif.

    In the 'Choose Modules' prompt choose only the modules that you'd need JUnit for.

提交回复
热议问题