I want to make a few Tests which have a specific dependecy on each other. Because of this, I have one "main"-Test, which should call the other tests. Here are two example classes:
@Stepwise
public class TestClass extends GebReportingSpec{
NotAutomaticExecutedIT test = new NotAutomaticExecutedIT();
def "anderen Test aufrufen"() {
given:
test."test"()
when:
def wert = true
then:
wert == true
}
}
and
@Ignore
public class NotAutomaticExecutedIT extends GebReportingSpec {
def "test"() {
given:
def trueness = true;
when:
def argument = true;
then:
argument != trueness;
}
}
If I run the test, i get the following exception:
groovy.lang.MissingFieldException: No such field: $spock_sharedField__browser for class: org.codehaus.groovy.runtime.NullObject at geb.spock.GebSpec.getBrowser(GebSpec.groovy:40) at geb.spock.GebSpec.methodMissing(GebSpec.groovy:54) at org.gkl.kms.webapp.tests.BestellungenIT.anderen Test aufrufen(TestClass.groovy:16)
Isn't it possible to do this?