db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew McIntyre (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-2006) Add JUnit and JUnitReport task as a target in Ant script
Date Tue, 31 Oct 2006 22:03:19 GMT
     [ http://issues.apache.org/jira/browse/DERBY-2006?page=all ]

Andrew McIntyre updated DERBY-2006:

    Attachment: derby_2006_v3.diff

Attaching an updated patch which has SecurityManagerTestSetup get the locations of junit.jar
and ant-junit.jar and updates the policy file so that the permissions in the policy file for
the code in these jars is now granted specifically to them.

Single suites run by setting derby.junit.testname to a testclass and running junit-oneclass
works fine, e.g.: 

ant -Dderby.junit.testname=org.apache.derbyTesting.functionTests.tests.lang._Suite junit-oneclass

Strangely, when I run All using the junitreport target, all the tests run and pass, but some
error (for which Ant/Junit does not provide a stack trace) causes junit to print a FAILED
message, although Ant then happily generates the report showing that all the tests passed
and reports BUILD SUCCESSFUL at the end:

    [junit] Running org.apache.derbyTesting.functionTests.suites.All
    [junit] Tests run: 1190, Failures: 0, Errors: 1, Time elapsed: 1,335.125 sec
    [junit] Test org.apache.derbyTesting.functionTests.suites.All FAILED

[junitreport] Transform time: 2720ms

Total time: 22 minutes 24 seconds

I'm planning on running tests in several other setups before committing this.

> Add JUnit and JUnitReport task as a target in Ant script
> --------------------------------------------------------
>                 Key: DERBY-2006
>                 URL: http://issues.apache.org/jira/browse/DERBY-2006
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>    Affects Versions:
>         Environment: Any
>            Reporter: Yip Ng
>         Attachments: derby_2006_v1.diff, derby_2006_v2.diff, derby_2006_v3.diff, example_output.zip
> Ant has an optional tasks called JUnit and JUnitReport that runs JUnit tests and produces
JUnit report respectively.  It will be nice to have these mechanism incorporated into the
Ant script so one can easily kick off a JUnit test and view the result. 

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message