setUpAll function

void setUpAll(
  1. void callback()
)

Registers a function to be run once before all benchmarks.

If this is called within a group, The callback will run before all benchmarks in that group. It will be run after any setUpAll callbacks in parent groups or at the top level.

Note: This function makes it very easy to accidentally introduce hidden dependencies between benchmarks that should be isolated. In general, you should prefer setUp, and only use setUpAll if the callback is prohibitively slow.

Implementation

void setUpAll(void Function() callback) => _g.setUpAll(callback);