Description Usage Arguments Value Examples
A test executor that iterates over multiple datasources and executes the testing suite on each. Output is organized in such a way as to give nice, consolidated results.
1 2 3 4 | test_database(datasource = NULL, tests = pkg_test(), skip = NULL, ...,
return_list = TRUE)
test_databases(datasource = NULL, tests = pkg_test())
|
datasource |
optional Defaults to using a SQLite database. Pass "dsn" to use all DSNs available on the system. Use "config" or a path to a "config.yml" file to use connection parameters in a YAML file. Connection parameters will be passed to 'dbConnect' as-is |
tests |
optional A character vector of yaml tests to execute. References 'dbtest' test suite by default |
skip |
optional The path to one or more YAML files that will be used to skip tests |
... |
Additional parameters passed on to methods |
return_list |
optional Whether to return a list of 'dbtest_results' objects. Defaults to TRUE. Provide FALSE if you desire a single database test to return a 'dbtest_results' object directly. |
Returns a list of lists containing the respective datasource labels and testthat output
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # test all dsns with default test suite -----------------------
## Not run:
test_database(datasource = "dsn")
## End(Not run)
# test sqlite with custom suite -------------------------
## Not run:
test_database(tests = "./path/to/my.yml")
## End(Not run)
# test connection yaml file with default test suite -----------
## Not run:
test_database(datasource = "./path/to/conn.yml")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.