auto_test: Watches code and tests for changes, rerunning tests as...

Description Usage Arguments Details See Also

View source: R/auto-test.R

Description

The idea behind auto_test() is that you just leave it running while you develop your code. Everytime you save a file it will be automatically tested and you can easily see if your changes have caused any test failures.

Usage

1
2
3
4
5
6
7
auto_test(
  code_path,
  test_path,
  reporter = default_reporter(),
  env = test_env(),
  hash = TRUE
)

Arguments

code_path

path to directory containing code

test_path

path to directory containing tests

reporter

test reporter to use

env

environment in which to execute test suite.

hash

Passed on to watch(). When FALSE, uses less accurate modification time stamps, but those are faster for large files.

Details

The current strategy for rerunning tests is as follows:

In the future, auto_test() might implement one of the following more intelligent alternatives:

See Also

auto_test_package()


testthat documentation built on March 2, 2020, 5:07 p.m.