Introduction
JUnit is a Testing Framework used by developers to perform unit testing in Java.JUnit modifies programming speed and increases the quality of code. Furthermore, JUnit increases the developer's confidence to build error-free code.
JUnit is based on the idea of "Testing first, then coding."Meaning JUNIT focuses on setting up the test data for a block of code that can first be tested and then implemented. This approach is like a cycle of minor Testing and minor coding, which increases a developer's productivity and code stability. This approach dramatically reduces the debugging time required by a programmer.
Installing Java
We need to install JDK Java Development Kit for starters to run JUnit. The JDK allows to code and runs Java programs. In this blog, we will be downloading the latest version of JDK for Windows.
Latest Version of JDK
Download and Run the JDK Installer.
Click Next
Keep the default installation directory and proceed. This can take some time to install JDK in your system. Finally, close the setup wizard and head over to the installation directory.
Copy the entire directory path and head to the Environment Variables options located under the advanced system properties.
Click on the Environment Variables button.
Click on New and set the following name and value.
Note: append \bin to the value copied from the JDK directory.
With this, we have finally installed and set up JDK.