Preferred Chrome Version : 127.0.6533.101
-
Download and Install Java • Download JDK: o Go to the Oracle JDK download page or AdoptOpenJDK. o Run the downloaded installer and follow the on-screen instructions. o Note the installation directory (usually C:\Program Files\Java\jdk-). • Set the System Path o Right-click on This PC or My Computer and select Properties. o Click on Advanced system settings on the left side. o Click on the Environment Variables button. • Set JAVA_HOME Variable: o In the Environment Variables window, click on New under the System variables section. o Set the variable name to JAVA_HOME. o Set the variable value to the path where JDK is installed (e.g., C:\Program Files\Java\jdk-). • Update PATH Variable: o In the System variables section, find the Path variable and select it, then click Edit. o In the Edit Environment Variable window, click New and add the following: o %JAVA_HOME%\bin o Click OK to save your changes. • Verify the Installation: o Open a new Command Prompt window (search for cmd). o Type the following command and press Enter: java -version o You should see the installed version of Java. If you see an error, ensure that you have followed the steps correctly.
-
Install Eclipse • Visit the Eclipse Downloads page. • Choose the Eclipse IDE for Java Developers (or another package based on your needs). • Click on the download link for the latest version and run the installer.
-
Clone the Code from Git Repository - https://github.com/UsharaniA/CoCareTestAutomation.git
-
Project Build – Using Maven o Right-click on the project in the Project Explorer. o Select Run As > Maven build... o In the Goals field, enter clean install and click Run. clean: Cleans the target directory. install: Compiles the code, runs tests, and installs the package into the local repository. o Maven will download the necessary dependencies, compile the code, run tests, and package the project.
-
Set the Test Case in the Runner file.
src/test/java/features/*.feature – Will Execute all the Feature files under src/test/java/features folder 6. Find the Screenshots under your Project Directory
- Create HTML Reports Goto to terminal from the project root folder from Eclipse (Ctrl+Alt+T) and enter allure generate –clean
Once the Report is created , host the report in local browser with command allure serve