

When you click on new in environment variables, it will open another window. Again go to Environment Variables and follow the below steps. Step 3) After creating JUNIT_HOME, create another variable with the name CLASSPATH. Which you can verify in environment variable window as shown in step 1 image. When you click on OK, it will create a new system variable with the given name and value. Provide JUnit value as JUnit path where you have copied JUnit jar files.Step 2) A “New System Variable” window will open: When you click on new button in environment variables, it will open another window Under environment window clicks on “new” button.Step 1) You need to set JUNIT_HOME environment variable to point out the base location where you have placed JUnit Jars.įor example, if you have created a JUnit folder in c: drive and placed jars there, then for environment settings you need to open control panel ->advanced ->environment variable. Click hamcrest-core.jarįor JUnit installation, you need JUnit jars, and you can download the desired version of JUnit jar file from JUnit official youbsite Click on jar link to download Junit version 4.12 as shown below Usually, you will select the latest version. The folder will be marked with the icon.Step 3) In the central repository you are shown all versions of Junit that can be downloaded. Right-click the new folder and select Test Resources. Right-click the test folder and select New Folder. Under Project Settings, click Modules and then open the Sources tab on the right. Configure the folder for test resourcesįrom the main menu, select File | Project Structure ( Ctrl+Alt+Shift+S) or click on the toolbar. If you're building your project with the native IntelliJ IDEA builder, you might need to create the resource root manually.

įor Maven and Gradle projects, the test resources folder is usually created automatically. In the Project tool window, this folder is located in the test root and is marked with. Test Resources Root is a folder that stores files associated with your test sources. The new test root should be marked with the icon in the Project tool window.įor more information on different types of folders, refer to Folder categories. Press Ctrl+Shift+O or click in the Gradle tool window to import the changes.
