You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Srepfler Srgjan <sr...@lnksystem.com> on 2005/12/29 18:14:44 UTC

[m2] dbMonster or dbUnit howto's

Did anyone have success in integrating dbMonster or dbUnit with a maven2 
j2ee project? Could you paste some pom's or how-to's on how you did 
this? Thanks and Happy Holidays

Srgjan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] dbMonster or dbUnit howto's

Posted by Srepfler Srgjan <sr...@lnksystem.com>.
>
> I don't use it. In fact, I don't even know what it does.
>
>
> Adam
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
http://dbmonster.kernelpanic.pl/
dbMonster is a tool which helps database application developers with 
tuning the structure of the database, tuning the usage of indexes, and 
testing the application performance under heavy database load. dbMonster 
generates as much random test data as you wish and puts it into SQL 
database. It provides a very pluggable interface and is trivial to use.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] dbMonster or dbUnit howto's

Posted by Adam Hardy <ad...@cyberspaceroad.com>.
Srepfler Srgjan on 29/12/05 20:42, wrote:
> Adam Hardy wrote:
> 
>> Srepfler Srgjan on 29/12/05 17:14, wrote:
>>
>>> Did anyone have success in integrating dbMonster or dbUnit with a 
>>> maven2 j2ee project? Could you paste some pom's or how-to's on how 
>>> you did this? Thanks and Happy Holidays
>>
>>
>>
>> I use DbUnit and the only interaction it has with maven2 is as a 
>> dependency.
>>
>> My unit tests are set up with a base class that uses DbUnit. I don't 
>> inherit the DbUnit testcase.
>>
> Thanks for your use case, very useful. How about dbMonster?

I don't use it. In fact, I don't even know what it does.


Adam

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] dbMonster or dbUnit howto's

Posted by Srepfler Srgjan <sr...@lnksystem.com>.
Adam Hardy wrote:

> Srepfler Srgjan on 29/12/05 17:14, wrote:
>
>> Did anyone have success in integrating dbMonster or dbUnit with a 
>> maven2 j2ee project? Could you paste some pom's or how-to's on how 
>> you did this? Thanks and Happy Holidays
>
>
> I use DbUnit and the only interaction it has with maven2 is as a 
> dependency.
>
> My unit tests are set up with a base class that uses DbUnit. I don't 
> inherit the DbUnit testcase.
>
Thanks for your use case, very useful. How about dbMonster?
Cheers,
Srepfler

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


[m2] anyone is running groovy plugin on m2?

Posted by Man-Chi Leung <ma...@gmail.com>.
hi,

i checked out the groovy plugin from
svn checkout svn://svn.codehaus.org/mojo/scm/trunk/mojo/mojo-sandbox/ 
maven-groovy-plugin  maven-groovy-plugin

it seems that the classpath is not recognized in groovy. anyone is  
having the same problem?


$>mvn groovy:groovy -e -DfileName=<project_dir>/src/main/groovy/ 
MyTest.groovy
[INFO]  
------------------------------------------------------------------------ 
----
[ERROR] BUILD ERROR
[INFO]  
------------------------------------------------------------------------ 
----
[INFO] Mojo error occurred:
Caused by: <project_dir>/src/main/groovy/MyTest.groovy: 3: unable to  
resolve class GroovyTestCase
@ line 3, column 1.
    class MyTest extends GroovyTestCase {


------------------------------------------------------------------------ 
----
<snippet of  MyTest.groovy>
------------------------------------------------------------------------ 
----
import groovy.util.GroovyTestCase

class MyTest extends GroovyTestCase {
     void testSomething() {
         assert 1 == 1
         assert 2 + 2 == 5 : "We're in trouble, arithmetic is broken"
     }
}
------------------------------------------------------------------------ 
----

For your information, I can run from Command Line Interface via groovy!
$groovy src/main/groovy/MyTest.groovy    <----OK!!


to my understanding the class 'groovy.util.GroovyTestCase' is in  
groovy-all-1.0-jsr-04.jar

it is possible that groovy-all-1.0-jsr-04.jar is not in the classpath  
via executing 'mvn groovy:groovy'  ?

Regards,
Manchi

Re: [m2] dbMonster or dbUnit howto's

Posted by Adam Hardy <ad...@cyberspaceroad.com>.
Srepfler Srgjan on 29/12/05 17:14, wrote:
> Did anyone have success in integrating dbMonster or dbUnit with a maven2 
> j2ee project? Could you paste some pom's or how-to's on how you did 
> this? Thanks and Happy Holidays

I use DbUnit and the only interaction it has with maven2 is as a 
dependency.

My unit tests are set up with a base class that uses DbUnit. I don't 
inherit the DbUnit testcase.

I used some code from the DbUnit website to extract a DTD from the 
schema with which I write the test data in xml.

I have one xml file per table with test data for that table in it.

I wrote a method in my base class to insert the test data in setup, and 
the subclass specifies which tables it needs data in.

I do a delete on all tables first.

The base class runs a transaction which wraps the deletes, the test data 
inserts and the test itself in a transaction and I roll back the 
transaction at the end.

It's not perfect but it's almost there.


Adam

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org