Navigate to the RegressionTestHarness directory and run ant
Note: When running either the IEDriverServer/chromedriver for the first time your firewall will ask for permission to allow access, so you should allow access and re-run ant again.
You will now see the Internet Explorer browser open and perfom a google search for "WebDriver API" and click on the search button and then the browser will close.
Congradulations thats our test case run via the harness.
Just a recap of the stages:
- Record Test Case(s) Using Selenium IDE
- Convert Test Case(s)
- Fix Compilaton Errors (if any)
- Specify Configuration
- Run Test Case(s)
Test Results
The harness will generate the results of the test case(s) run in two styles.- testNG - index.html in the RegressionTestHarness/results directory
- JUnit - index.html in the RegressionTestHarness/results/junitreports directory
Hi,
ReplyDeleteNavigate to the RegressionTestHarness directory and run ant
means: C:RegressionTestHarness>ant ?
After this
what should i do?
I assume you have installed Ant?
ReplyDeleteif so then navigate to the "RegressionTestHarness" directory and then type: ant
for example
C:\workspace\RegressionTestHarness>ant
you wait for a while and you will see that your tests will start to run.
You do have some tests cases created?
Hi Imran,
ReplyDeleteI'm getting following upon executing ant via command line.
You need to specify at least one testng.xml, one class or one method
testng] The tests failed.
junit-report:
[exec] Buildfile: c:\Selenium-Regression-Project-master\RegressionTestHarne
uild.xml
[exec]
[exec] report:
[exec]
[exec] BUILD FAILED
[exec] c:\Selenium-Regression-Project-master\RegressionTestHarness\build.xm
: c:\Selenium-Regression-Project-master\RegressionTestHarness\results\junitr
ts does not exist.
[exec]
[exec] Total time: 0 seconds
[exec] Result: 1
D SUCCESSFUL
l time: 4 seconds
pls assist
hi imran,
ReplyDeletei am getting this error in eclipse
org.testng.TestNGException:
Cannot instantiate class com.examples.tests.test1
in command prompt it is working fine