Parallel test suite run with testng.xml

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Parallel test suite run with testng.xml

jkaushik
This post has NOT been accepted by the mailing list yet.

Hi,
I have the following testng.xml :

<suite name="All" verbose="2" thread-count="8" parallel="methods" time-out="120000"> 

  <test name="All"> 
    <packages> 
      <package name="com.mycompany.*" /> 
   </packages> 
 </test> 

</suite> 

I use teh above xml to run my tests in parallel. I have mutiple projects and over 10,000 test cases.
I have ouple of issues:

1. I see random test failures from time to time, the same tests runs fine in the next run.

2. In some of the runs , TestNG does not run all the tests in a suite, at other times it does.
The tests which did not run were not failures, in fact seems like they got ignored for some reason.

Appeciate your time and help !

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Parallel test suite run with testng.xml

jkaushik
This post has NOT been accepted by the mailing list yet.
Looks like the issue is with :
 <packages> 
      <package name="com.mycompany.*" /> 
   </packages> 

I have multiple projects , each with testng.xml with the package name above.
Look like such package name( with wildcard )  confuses the multiple TestNG threads which are trying to run test cases in parallel ( I am using  parallel="methods" ).

Once I qualify the package name like below,  seems to solve the issue ( still testing ..... ) :

   <packages> 
      <package name="com.mycompany.loadbalancer.channelfuturelistener" />
      <package name="com.mycompany.loadbalancer.exception" />
      <package name="com.mycompany.loadbalancer.mydriver" /> 
      <package name="com.mycompany.loadbalancer.log" />
      <package name="com.mycompany.loadbalancer.message" />
      <package name="com.mycompany.loadbalancer.options" />
      <package name="com.mycompany.loadbalancer.porthandler" />
   </packages>