Hi folks, there is also a M2 plugin for dbunit - having the choice I would use dbunit ...
Siegfried Goeschl Mark Struberg wrote: > And if you are using maven you can use the sql-maven-plugin and do something > like this: > > <plugin> > <groupId>org.codehaus.mojo</groupId> > <artifactId>sql-maven-plugin</artifactId> > <version>1.4-3united-1</version> > > <configuration> > <driver>com.mysql.jdbc.Driver</driver> > <url>jdbc:mysql://localhost/testdb</url> > <username>root</username> > <password></password> > <anonymous>true</anonymous> > > <srcFiles> > <srcFile>src/main/sql/mysql/createdb.sql</srcFile> > <srcFile>src/main/sql/mysql/database.sql</srcFile> > <srcFile>src/main/sql/mysql/createindex.sql</srcFile> > <srcFile>src/test/sql/mysql/testdata.sql</srcFile> > </srcFiles> > </configuration> > > <executions> > <execution> > <id>setup-test-database</id> > <phase>process-test-resources</phase> > <goals><goal>execute</goal></goals> > </execution> > </executions> > > <dependencies> > <dependency><!-- todo: check for newer version --> > <groupId>mysql</groupId> > <artifactId>mysql-connector-java</artifactId> > <version>5.1.6</version> > <scope>runtime</scope> > </dependency> > </dependencies> > </plugin> > > > LieGrü, > strub > > --- Siegfried Goeschl <[email protected]> schrieb am Di, 10.3.2009: > > >> Von: Siegfried Goeschl <[email protected]> >> Betreff: Re: [Webtest] Prepopulating a Database? >> An: [email protected] >> Datum: Dienstag, 10. März 2009, 9:21 >> Hi Mark, >> >> if you are using ANT scripting of WebTest you can use >> DBUnit ... >> >> Siegfried Goeschl >> >> Mark Levison wrote: >> >>> How do WebTest users prepopulate an empty database? >>> >> Delete data once >> >>> its been added? Does this require writing things in >>> >> Groovy? >> >>> If code is required is there any way I can bridge >>> >> things into .NET? >> >>> One of the client requirements is that no code be >>> >> written outside of .NET? >> >>> Mark >>> >>> -- >>> Cheers >>> Mark Levison >>> Blog: http://www.notesfromatooluser.com/ >>> Recent Entries: Agile/Scrum Smells: >>> http://www.notesfromatooluser.com/2008/06/agilescrum-smells.html >>> Agile Games for Making Retrospectives Interesting: >>> http://www.notesfromatooluser.com/2008/10/agile-games-for-making-retrospectives-interesting.html >>> >> _______________________________________________ >> WebTest mailing list >> [email protected] >> http://lists.canoo.com/mailman/listinfo/webtest >> >> > > > > _______________________________________________ > WebTest mailing list > [email protected] > http://lists.canoo.com/mailman/listinfo/webtest > > > _______________________________________________ WebTest mailing list [email protected] http://lists.canoo.com/mailman/listinfo/webtest

