mardi 3 mars 2015

Grails functional test - DB setup/teardown, running as JUnit in Eclipse

I am running Geb functional tests in my Grails app through Eclipse "Run As JUnit..."


This normally works great and allows me to keep my test server running with grails run-app, and I get fast test execution times.


However, it doesn't allow me to use GORM domain objects in my setup/teardown methods. Those only work if I run with grails test-app, which requires a much longer cycle time.


Is there another way I can access the DB from my functional tests without GORM? I would be perfectly OK accessing the DB directly through the groovy.Sql class, as long as I don't have to duplicate configuration.


Aucun commentaire:

Enregistrer un commentaire