Install Eclipse:
Click on: Download Eclipse IDE for Java Developers
Unzip the downloaded zip file and double click eclipse.exe.
Choose a folder to setup your workspace.
Install TestNG:
Open eclipse IDE
Under Help Tab, goto Eclipse Marketplace.
In Find, type TestNG.
Click install on TestNG for eclipse.
Click confirm for both TestNG and TestNGM2E
Click I agree to the agreement --> Confirm.
Click "Install Anyway" for the warning message that comes.
Restart eclipse.
Install Maven:
Download the binary zip archive (apache-maven-3.8.1-bin.zip)
Goto Mac terminal, type mvn -version. You will get error about unknown command.
Set the MAVEN_HOME and set the PATH. In terminal, type the following:
export MAVEN_HOME=~/apache-maven-3.8.1
export PATH=$PATH:$MAVEN_HOME/bin
5. Now if you type mvn -version, you will get a valid output.
6. If you still get error in step 5, type echo $PATH in terminal. A path will be displayed in the terminal output. See if apache-maven-3.8.1 folder is available in the path displayed in the terminal output. If not, paste the downloaded apache-maven-3.8.1 folder in the path. In a new terminal, repeat step 4 and 5.
However, this is not a permanent setup (ie. every time you close and open the terminal, you have to run this command again to make sure maven is accessible. To get a permanent setup, refer this link https://stackoverflow.com/a/68324373/3492139 .