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 54 55 56 57 58 59 60 61 62 63 64 65 66
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/unitTests.R
\name{utest}
\alias{utest}
\alias{utest,function-method}
\alias{utest,character-method}
\alias{utest,RUnitTestSuite-method}
\title{Running Unit Tests}
\usage{
utest(x, ...)
\S4method{utest}{`function`}(x, run = TRUE)
\S4method{utest}{character}(
x,
filter = "^runit.+\\\\.[rR]$",
fun = "^test\\\\.",
...,
testdir = "tests",
framework = c("RUnit", "testthat"),
quiet = Sys.getenv("RCMDCHECK") != "FALSE",
lib.loc = NULL
)
\S4method{utest}{RUnitTestSuite}(x, ..., quiet = FALSE, outdir = NULL)
}
\arguments{
\item{x}{object to which a unit test is attached}
\item{...}{extra arguments to allow extensions and are passed to
the unit framework running funcitons.}
\item{run}{a logical that indicates if the unit test should be run}
\item{filter}{pattern to match files that contain the definition of
the unit tests functions to run.}
\item{fun}{patter to match the test functions to run.}
\item{testdir}{directory where to look for the test files}
\item{framework}{unit test framework}
\item{quiet}{a logical that indicates if the tests should be run silently}
\item{lib.loc}{path to a library where installed packages are searched for.
Used is of the form \code{x='package:*'}.}
\item{outdir}{output directory}
}
\value{
Returns the result object returned by the unit-test suite executer.
}
\description{
Run unit tests in a variety of settings.
This is still \strong{very} experimental.
}
\section{Methods (by class)}{
\itemize{
\item \code{utest(`function`)}: Run the unit test assoicated to a function.
\item \code{utest(character)}: Run a package test suite
\item \code{utest(RUnitTestSuite)}: Runs a RUnit test suite
}}
|