0

I have got three selenium test classes and have created three ant targets for the same. When executed those targets in PARALLEL mode, starts three test windows.

<target>
  <some task is done here>
  <parallel>
    <target test1>
    <target test2>
    <target test3>
  </parallel>
</target>

Everything goes fine until one test class finishes running all its methods and somehow shutsdown the selenium server causing other test cases to fail.

My base class tearDown() method has selenium.stop() as I need to close the browser windows once my test execution is done. I tried using selenium.close() but that gives me a pop up, and I have got three windows including selenium log window for a single test case.

Is there any way I can achive parallel test run.

I need to execute these test cases from ANT..

I am using selenium 2.21.0.

jonsca
  • 10,218
  • 26
  • 54
  • 62
Karma
  • 31
  • 12
  • You could add a sleep or waitfor condition to the thread running selenium server. See: http://stackoverflow.com/questions/2158937/can-ant-launch-two-java-applications-concurrently/2180665#2180665 – Mark O'Connor Nov 02 '12 at 12:14

1 Answers1

0

You better go with selenium grid rather than using ant.Selenium grid is the best way to execute test cases in parallel.

Abhishek_Mishra
  • 4,551
  • 4
  • 25
  • 38