java - What is the difference between Annotation Driven and Global extensions in Spock -
i'm trying learn writing extensions in spock testing framework. i've come across 2 different types of extensions:
- annotation driven (like
@ignore
, etc) - global extension (like integrating spring framework inside test)
so question is: what difference between them? when should prefer 1 type of extensions on custom extensions?
thanks
annotation driven extensions have smaller scope , usually affect single test method (or group of methods)
global extensions have larger scope , allow affect how spock things in broader area (e.g. reporting)
my suggestion start annotation extension , see if can accomplish want in smallest scope possible.
Comments
Post a Comment