DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29946>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29946

Ant junit xml reporting problem.

           Summary: Ant junit xml reporting problem.
           Product: Ant
           Version: 1.5.3
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Optional Tasks
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Folks,
This is my first usage of bugzilla and I am not expirienced guy with it. I have 
written a new bug because I did not find something similar to this one.

The problem is based on incorrect generation XML reports for JUnit tests. I 
think that problem based on multithread execution environment, I have started 
JUnitPerf test from Ant build and I've got a problem like this:
  <testcase name="writeThread" time="0.0" time="0.0"></testcase>
  <testcase name="writeThread" time="0.0"></testcase>
  <testcase name="readThread"></testcase>
  <testcase name="readThread" time="0.0"></testcase>

the time attribute is duplicated or omitted. CruiseControl cannot parse it 
works with errors. 

I put into bug description body of JUnitPerf test ipmlementation below.

/**
 * @author Victor S.
 */
public class DbIdStorageFactoryThreadSafeTestCase extends TestCase
{

    public DbIdStorageFactoryThreadSafeTestCase(String name)
    {
        super(name);
    }

    public static Test suite() {
        TestSuite suite = new TestSuite();
        DbIdStorageFactoryThreadSafeTestCase writeThread = new 
DbIdStorageFactoryThreadSafeTestCase("writeThread");
        DbIdStorageFactoryThreadSafeTestCase readThread = new 
DbIdStorageFactoryThreadSafeTestCase("readThread");
        suite.addTest(writeThread);
        suite.addTest(readThread);
        int CONCURENT_USERS = 10;
        LoadTest loadTest = new LoadTest(suite, CONCURENT_USERS, 200);
        loadTest.setEnforceTestAtomicity(true);
        return loadTest;
    }

    public void writeThread()
    {
// do something, sleep(0)
    }

    public void readThread()
    {
// do something, sleep(0)
    }

}

I did not work with ant-junit SRCs deeply neverthless I think that 
org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter is not 
thread safe.
I am ready to give more information about this issue.
Thank you.
Victor S.
EPAM, Lead Developer.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to