Selenium 4 absolute beginners - How to create Batch execution file
Sample Batch Execution file
@echo off
:: Delete the existing log file
ERASE C:\Softwares\Workspace\ProductNameAutomation\build.log
:: Create a new Empty log file
echo.>C:\Softwares\Workspace\ProductNameAutomation\build.log
:: Setting project Home Path
SET PROJECT_HOME=C:\Softwares\Workspace\ProductNameAutomation
cd %PROJECT_HOME%
echo CURRENTLY WORKING ON DIRECTORY %PROJECT_HOME% PATH
echo Setting configurations
SET M2_HOME=C:\Softwares\Workspace\apache-maven-3.5.4
SET M2=%M2_Home%\bin
SET path=%M2_Home%\bin
::SET Java_Home="C:\Program Files (x86)\Java\jdk1.8.0_181"
::Start the test case
echo test execution in progress
call mvn -f C:\Softwares\Workspace\ProductNameAutomation\pom.xml clean install compile test -X -l C:\Softwares\Workspace\ProductNameAutomation\build.log
echo test execution in completed
:: Generating report based on above ran test cases
echo Report generation is in progress
call mvn surefire-report:report-only
echo Report generation is completed
echo Please check ../target/site folder for reports
pause
Comments
Post a Comment