Configuring IntelliJ IDEA for unit testing with JUnit

前端 未结 5 1171
刺人心
刺人心 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:15

    If you already have test classes you may:

    1) Put a cursor on a class declaration and press Alt + Enter. In the dialogue choose JUnit and press Fix. This is a standard way to create test classes in IntelliJ.

    2) Alternatively you may add JUnit jars manually (download from site or take from IntelliJ files).

提交回复
热议问题