You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Ramin Moazeni <rm...@gmail.com> on 2007/05/22 18:14:23 UTC
JUnit Conversion Question
Hi
As part of working of Junit test conversion, I added one of the
sample junit tests to derby src which does nothing important.
I ran "ant all" without any errors.
The test can be run successfully as a standalone tests:
[ramin@localhost trunk]$ java junit.textui.TestRunner
org.apache.derbyTesting.functionTests.tests.jdbcapi.FirstJUnitTest
.
Time: 0.01
OK (1 test)
However, the derbyall test fails:
derbyall/derbyall.fail:jdbcapi/FirstJUnitTest.java
derbyall/derbynetclientmats/derbynetmats.fail:jdbcapi/FirstJUnitTest.java
I modified:
* java\testing\org\apache\derbyTesting\functionTests\suites\jdbcapi.runall
and added jdbcapi/FirstJUnitTest.java
I have to yet run suites.All test.
Did I miss anything here?
Thanks,
Ramin
Re: JUnit Conversion Question
Posted by Myrna van Lunteren <m....@gmail.com>.
On 5/22/07, Ramin Moazeni <rm...@gmail.com> wrote:
> Hi
>
> As part of working of Junit test conversion, I added one of the
> sample junit tests to derby src which does nothing important.
> I ran "ant all" without any errors.
>
> The test can be run successfully as a standalone tests:
> [ramin@localhost trunk]$ java junit.textui.TestRunner
> org.apache.derbyTesting.functionTests.tests.jdbcapi.FirstJUnitTest
> .
> Time: 0.01
>
> OK (1 test)
>
> However, the derbyall test fails:
> derbyall/derbyall.fail:jdbcapi/FirstJUnitTest.java
> derbyall/derbynetclientmats/derbynetmats.fail:jdbcapi/FirstJUnitTest.java
>
> I modified:
> * java\testing\org\apache\derbyTesting\functionTests\suites\jdbcapi.runall
> and added jdbcapi/FirstJUnitTest.java
>
> I have to yet run suites.All test.
>
> Did I miss anything here?
>
> Thanks,
> Ramin
>
Hi Ramin,
In the 'old' test harness we would add junit tests into a suite with
extension 'junit'.
But, don't even go there; we - the developer community - have decided
not to put any more effort into improving the 'old' test harness and
instead to move toward pure junit testing.
So, you just need to add your tests to the list in the appropriate
_Suite class (e.g.
org.apache.derbyTesting.functionTests.tests.jdbcapi._Suite.java).
For the time being, we all need to run derbyall using the old test
harness, and suites.All using the junit framework.
Myrna