Spock only allows access to static variables from a block.
Is there any workaround with which instance variables can be used inside the where block?
You can annotate instance variables with @Shared, see http://spockframework.imtqy.com/spock/docs/1.0/data_driven_testing.html#sharing-of-objects-between-iterations .
@Shared
: . , . , , , where, .
where
Source: https://habr.com/ru/post/1533865/More articles:How to make Flowplayer play automatically in Android WebView? - jquerySpeed up copying in java - javaAndroid KitKat (4.4) autoplay video no longer works in webview - androidIs it synchronized to ensure that the thread sees the last value of the mutable variable modified by another thread? - javaне удалось установить шпион на HttpSession/Mockito - javaFlask-SQLAlchemy and Flask-Restless don't force grandchildren - pythonFailed to fulfill target org.apache.maven.plugins: maven-compiler-plugin: 2.0: compile - javaJbuilder turn & in \ - jsonThe order of the WPF RichTextBox PreviewKeyDown and OnTextChange events is different from the usual TextBox - c #OnClickListener в динамическом расположении таблиц - androidAll Articles