导包:

1、Hamcrest Core 包:    https://mvnrepository.com/artifact/org.hamcrest/hamcrest-core/1.3

2、Junit包:  https://mvnrepository.com/artifact/junit/junit/4.12

Intellij IDEA 配置Junit

打开Intellij IDEA

如果还未安装JUnit, 点击File  ==》 Settings ==》Plugins ==》 输入Junit 进行搜索 ==》 JUnit Generator V2.0

 Browse repositories ==》 install (安装完毕后重启 Intellij IDEA)

Intellij IDEA 配置Junit

Intellij IDEA 配置Junit

 

 点击File  ==》 Settings ==》 Other Generator ==》JUnit Generator

Output Path:  设置为:  ${SOURCEPATH}/../../test/java/${PACKAGE}/${FILENAME}

Intellij IDEA 配置Junit

 

相关文章:

  • 2022-01-01
  • 2021-12-12
  • 2021-04-01
猜你喜欢
  • 2021-12-01
  • 2021-11-03
  • 2021-08-05
  • 2021-11-29
  • 2021-11-29
  • 2018-01-23
  • 2021-08-05
相关资源
相似解决方案