JUnit
JUnit
JUnit related topics will be covered here.
Installation
Files:
I'd suggest downloading these into wherever your java folder is.
Editing Path/Environment Variables
Java's way of editing path/env variables
Windows
Go to:
Setings> Edit the system environment variables > Environment variables > System variables > CLASSPATH
Add two entries which point to the locations of your files!
i.e. C:\Somepath\junit-4.13.jar
Note: Replace Somepath with your file locations
Mac/Linux/Unix
You're going to have to edit the commands based on where your files are located.
I'd suggest pasting the commands into a text document and modifying them before entering them in the command line.
Either run this in your terminal each new session:
export CLASSPATH=$CLASSPATH:Wherever your files are/junit-4.13/junit-4.13.jar:Wherever your files are/junit-4.13/hamcrest-core-1.3.jar:.
Or navigate to .bash_profile and write this:
cd ~cat .bash_profileecho export CLASSPATH=$CLASSPATH:Wherever your files are/junit-4.13/junit-4.13.jar:Wherever your files are/junit-4.13/hamcrest-core-1.3.jar:. >> .bash_profile
If you can't find .bash_profile:
Make sure you're in the right directory (i.e. cd ~
)
Try writing l
- You should see this:
fchishtie@MyComputerName ~ l ✔ 2148 15:04:11total 1112...-rw------- 1 fchishtie staff 7.1K 5 Mar 2019 .bash_history-rw-r--r-- 1 fchishtie staff 593B 2 Apr 2019 .bash_profile...
If you want to be cool & faster you can also write l | grep .bash_profile
but don't worry about this too much.
If you don't see that - try writing cd ~
again & retry the commands above!