Advanced features

This chapter covers the advanced features of test-r, which are either not available at all using the built-in test harness, or at least being unstable.

  • Dependency injection allows sharing dependencies between tests.
  • Tags allow grouping tests and running only a subset of them.
  • Benches are used to measure the performance of functions.
  • Per-test configuration allows customizing the test execution from the code, instead of using command line options.
  • Flaky tests can be either retried, or executed multiple times to verify they aren't flaky
  • Dynamic test generation allows creating new tests from code