Thursday, May 15, 2014

Selenium : One click Selenium suite execution using Bat file

One click Selenium suite execution using Bat file

Pre-Req:

  1. Works for Selenium TestNG Suite.
  2. ANT+build.xml should have been implemented in the framework.
Note : Your build.xml,TestNG.xml will all be in the same location of the project.

Steps :

  • Goto to your project , where your build.xml resides.
  • Create a new text file there .
  • Copy the below code and paste it inside the text file.
  • Rename the extension as ".bat"

Code here :

echo.
rem *** Created By Deepak ******
echo.

call ant -buildfile build.xml setClassPath init all clean compile build run

echo.
echo  **** view your Test-NG results in path "your_project\test-output\index.html" ********
echo.
echo  *** you can remove wait screen , by deleting pause command in this file ****
echo.
pause


No comments:

Post a Comment