Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Geb DB test helpers
abstract class MyBaseGebTest extends GebReportingTest {
SessionFactory sessionFactory = ApplicationHolder.application.mainContext.sessionFactory
def inTransaction(closure) {
inNewSession {
TransactionRunner.getInstance().runInNewTransaction(closure)
}
}
def inNewSession(closure) {
// GORM class is arbitrary, I just picked one of ours
MyModelClass.withNewSession { session ->
closure(session)
}
}
}
@dsrini-open

Do you have the configuration for Spring injection ? Also, how do you use this in your child classes. Say for example need to do verification of webpage elements values are reflecting a DB table values (filter based on a combo / input / radio ), do you have a piece of code to illustrate the same ? Thanks a lot in advance, by the way only one post I could find integrating DB with GEB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.