public enum IsolationMode
| Enum Constant and Description |
|---|
InstancePerLeaf
A new instance of the
interface Spec class is instantiated for every
leaf class TestCase. Container test cases are executed only as
part of the path to a leaf test. |
InstancePerTest
A new instance of the
interface Spec class is instantiated for every
class TestCase - both containers and leaf tests - and they are
executed once the previous test has completed. |
SingleInstance
A single instance of the
interface Spec class is instantiated,
and then used for every class TestCase. |
public static IsolationMode SingleInstance
A single instance of the interface Spec class is instantiated,
and then used for every class TestCase.
Test cases will be executed as soon as they are discovered.
interface Spec,
class TestCasepublic static IsolationMode InstancePerTest
A new instance of the interface Spec class is instantiated for every
class TestCase - both containers and leaf tests - and they are
executed once the previous test has completed.
For example, in the following test plan:
"this test" { println("a") "nested test" { println("b") } "nested test 2" { println("c") } }
The output will be: a a b a c
interface Spec,
class TestCasepublic static IsolationMode InstancePerLeaf
A new instance of the interface Spec class is instantiated for every
leaf class TestCase. Container test cases are executed only as
part of the path to a leaf test.
For example, in the following test plan:
"this test" { println("a") "nested test" { println("b") } "nested test 2" { println("c") } }
The output will be: a b a c
interface Spec,
class TestCase