26
26
Encapsulated test groups can be run in parallel if desired. (On by
27
27
default with up to 3 processes)
29
See the "PARALLEL" for details about what runs in what processes.
30
32
Tests groups can be sorted, randomized, or sorted via a custom
31
33
method. (see Test::Workflow)
193
195
There is currently experimental support for Test::Builder2. Once
194
196
Test::Builder2 is officially released, support will be finalized.
199
When tests run in parallel (default) the following notes should be
202
parallel => 1 means fork for test blocks, but only run 1 proc at a time.
203
parallel => 0 turns forking off completely
204
describe and cases run in the parent process
205
describe something => sub { ... }
207
Blocks like the above run in the parent process, all will run BEFORE
208
any test or state-building blocks.
210
test blocks run in their own processes
211
tests foo => sub { ... };
213
Test blocks like this will all run in their own process.
215
before_each, after_each and around_each run in the test block process
216
before_each set_it => sub { ... };
217
tests test_it => sub { ... };
219
"XXX_each" will run in the same process as the test block, that is
220
after the fork() call.
222
before_all, after_all, and around_all run in the parent process
223
before_all set_once => sub { ... };
224
tests test_it => sub { ... };
226
"XXX_all" will run in the parent process, that is before fork() is
227
called to run the test block.
229
each case + test combination runs in its own process
235
This effectively builds 4 combinations to run: c1+t1, c1+t2, c2+t1,
236
c2+t2. Each of these 4 combinations will be run in their own
237
process. The case will run first, followed by the test block.
239
Be aware, it is easy to define an exponential number of tests using
240
the case+test combiner.
197
243
There are 2 ways to configure Fennec. One is to specify configuration
198
244
options at import. The other is to subclass Fennec and override the
291
337
MORE COMPLETE EXAMPLE
292
338
This is a more complete example than that which is given in the
293
339
synopsis. Most of this actually comes from Method::Workflow, See those
294
docs for more details. Significant sections are in seperate headers, but
340
docs for more details. Significant sections are in separate headers, but
295
341
all examples should be considered part of the same long test file.
297
343
NOTE: All blocks, including setup/teardown are methods, you can shift @_