Hi,
don’t get it and it drives me grazy…
I’ve setup a project with gradle, spock and geb. Everythings works fine, crated a lot of tests and now I want to start some cross browser testing. Easy, I thought.
So I created two tasks:
task Safari(type: Test) {
systemProperty “geb.env”, “localeSafari”
}
task Chrome(type: Test) {
systemProperty "geb.env", "localeDesktop"
}
When I run:
./gradlew Safari --tests common.LoginCheck
or
./gradlew Chrome --tests common.LoginCheck
it works as expected. It starts the regarding Browser and tests just this one class.
than I’ve created
task testAll (type:Test, dependsOn: ["Safari",
Preformatted text"Chrome"])
this runs all(!) tests, but only on Chrome
and the task:
task testSafari(type:Test, dependsOn: Safari)
opens Safari but run all tests and ignores the --tests
Guess that there is a point where I miss some understanding of gradle, but don’t get the point. Invested hours in trial and error, searching and reading, but don’t get it.
Someone here who can help? Would appreciate it very much.
tnx
Carsten