0

I had read Configuring IntelliJ IDEA for unit testing with JUnit, but it can't solve my problem.Here is my problem.

I use IntelliJ IDEA for Spring Boot Project,now I want to do some unit tests.So firstly I add junit dependency in my pom file.

<dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <scope>test</scope>
    </dependency>

And next step, I install the JunitGenerator V2.0 plugin. And then,it seems that there are two ways that I can choose to generate test file.One of them is using Alt + Insert in class file and choosing Junit Test to generate test file.And the other is using Ctrl + Shift + T or Alt + Enter to generate test file.

My problem is, what's different between them?And which way I should choose?

Sin Chang
  • 81
  • 1
  • 5
  • How is that a problem? Just generate two files and see if there's a difference. – Tom May 04 '17 at 09:21
  • Oh I forget to speak, firstly I can use Alt + Insert to generate test file.But after I do some configuration in IDEA Setting-Junit Generator,It can't work.I use Alt + Insert again,this time nothing changed.@Tom – Sin Chang May 04 '17 at 09:31
  • so you made a mistake in the configuration of the plugin... By default it doesn't put generated test classes in the correct location (src/test/java) – jwenting May 04 '17 at 10:07

0 Answers0