March 2016
Intermediate to advanced
304 pages
8h 9m
English
Data tables should be your bread and butter when writing Spock parameterized tests. They shine when all input and output parameters are known in advance and thus can be embedded directly in the source code.
But sometimes the test parameters are computed on the spot or come from an external source (typically a file, as you’ll see later in this chapter). For those cases, using data pipes is a better option. Data pipes are a lower-level construct of Spock parameterized tests that can be used when you want to dynamically create/read test parameters.[8]
Data tables can be seen as an abstraction over data pipes.
As a first example, let’s rewrite the first data table code of listing ...
Read now
Unlock full access