Skip to content
This repository was archived by the owner on Nov 21, 2017. It is now read-only.

TestNG parallel run issue with wildcard in package under test #109

@GoogleCodeExporter

Description

@GoogleCodeExporter

What steps will reproduce the problem?
1. Create a test java project in eclipse with package like com.mycompany.*
    I have  
                 com.mycompany.xml
                 com.mycompany.tools
                  com.mycompany.common
                  com.mycompany.utility
                  com.mycompany.random
                   com.mycompany.db
  Add multiple Test classes ( containing multiple tests ) in each package.

2. Use 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> 


3. Run the tests ( I am using the TestNG ANT plugin )

What is the expected output? 
I expect the number of tests executed to be the same every time I run the tests


What do you see instead?
Instead,  I see a varying number of tests being executed ( its random and 
intermittent ). Sometime I see the number I expect ( say 100 ) and other time 
it is 102 or 96.


What version of the product are you using? On what operating system?
TestNG 6.8beta 20120825_1010 by C?dric Beust (cedric@beust.com)
Windows 2008 R2 64 bit


Please provide any additional information below.
Looks like the parallel threads executing the test methods gets confused by 
wildcard in the package name (  <package name="com.mycompany.*" />  ).

If I fully qualify the package name, I do not see this issue.

Original issue reported on code.google.com by sharad.k...@gmail.com on 26 Mar 2013 at 7:13

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions