1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/auto-test.R
\name{auto_test}
\alias{auto_test}
\title{Watches code and tests for changes, rerunning tests as appropriate.}
\usage{
auto_test(
code_path,
test_path,
reporter = default_reporter(),
env = test_env(),
hash = TRUE
)
}
\arguments{
\item{code_path}{path to directory containing code}
\item{test_path}{path to directory containing tests}
\item{reporter}{test reporter to use}
\item{env}{environment in which to execute test suite.}
\item{hash}{Passed on to \code{\link[=watch]{watch()}}. When FALSE, uses less accurate
modification time stamps, but those are faster for large files.}
}
\description{
The idea behind \code{auto_test()} is that you just leave it running while
you develop your code. Every time you save a file it will be automatically
tested and you can easily see if your changes have caused any test
failures.
}
\details{
The current strategy for rerunning tests is as follows:
\itemize{
\item if any code has changed, then those files are reloaded and all tests
rerun
\item otherwise, each new or modified test is run
}
In the future, \code{auto_test()} might implement one of the following more
intelligent alternatives:
\itemize{
\item Use codetools to build up dependency tree and then rerun tests only
when a dependency changes.
\item Mimic ruby's autotest and rerun only failing tests until they pass,
and then rerun all tests.
}
}
\seealso{
\code{\link[=auto_test_package]{auto_test_package()}}
}
\keyword{debugging}
|