Let us discuss on JUnit 5 environment setup in Java Application.
JUnit 5 does not required any major setup. It’s required following library and IDE:
- JDK : Min 1.8 or above
- IDE : Eclipse/STS or Netbean or IntelliJ
- Latest version of Junit 5 is readily available with latest version of IDE
- How to setup JUnit 5 environment Setup in Maven Java Application.
- Junit 5 code coverage by JACOCO
- JACOCO Code coverage plugin integration with eclipse/STS
Junit 5 Setup in Java Application
You can add JUnit 5 library in your Java Application by follow below steps:
- Right clock on your project -> Properties->Build Path-> Configure Build Path
- Select Junit Library by following below steps in screen shot.
- After clicking in Next button (Step 5). You will get below screen where you can select Junit 5.
- After click on Finish button (Step 7) this JUnit 5 library will add on your application.
- Now you can click on “Apply” or “Apply and Close” button to complete this process.
Now your application is setup to write test JUnit 5 test cases.
In further topic you will learn about how to write JUnit Test Cases.