- IntelliJ for IDE (Any IDE can be used)
- JDK Installation and setting up environment variables
- Maven for dependencies
- Settings.xml configuration (In case you are using or accessing private repositories)
- IntelliJ can be downloaded either using `Ubuntu Software` by searching IntelliJ
Or another way to install IntelliJ is using snap via terminal.
2. JDK can be installed in ubuntu via terminal
Check JDK installation path using below command
- whereis java
Copy this command and paste in a bashrc file. Command mentioned below
Bashrc file can be viewed directly on terminal using below command
If bashrc not exists, you can create new and paste above content using:
sudo vim ~/.bashrc
3. Maven can be configured in ubuntu using terminal commands
Once installed, you can check using the below command.
4. In case you are using external jar files/configuration in projects, you need to paste settings.xml file in Maven’s .m2 repository.
Check the directory path of settings.xml and paste using cp command
cp /usr/local/bin/apache-maven-2.2.1/conf/settings.xml .m2/
Once copied, check using list command in ubuntu to verify settings.xml resides under .m2
Congrats! The configuration is done.
Step # 02
- Clone the project’s repository:
Make sure you have rights to access the correct repository.
- Create a new folder under Documents, open in terminal and paste above copied URL in terminal.
- Enter credentials and it gets cloned into your system.
- Open IntelliJ IDE
- Open project using open and select pom.xml file and open as project
- Once the project opens, it will start refreshing Maven to update dependencies, it will take a few min to resolve all dependencies. As soon as it refreshes the project, dependencies will show up in the right panel under the dependencies folder.
- Build the project to see everything loads and run any test.
Few extra configurations required for Cucumber BDD framework other than above mentioned steps.
- Install Gherkin plugin
- Install Cucumber plugin
- Check Enable annotation processing under annotations from settings
Rebuild project and run any test. It will configure everything.