This package is primarily useful for developers ofDBI backends. It provides aconsiderable set of test cases for DBI backends. These test casescorrespond to theDBIspecification. Please follow the steps below to add these test casesto your DBI backend.
Install from CRAN via
install.packages("DBItest")or the development version using
devtools::install_github("r-dbi/DBItest")In your driver package, addDBItest to theSuggests: and enable the tests. Run the following code inyou package’s directory:
# install.packages("usethis")usethis::use_package("DBItest","suggests")usethis::use_test("DBItest")This enables testing usingtestthat (if necessary) andcreates, among others, a filetest-DBItest.R in thetests/testthat directory. Replace its entire contents bythe following:
DBItest::make_context(Kazam(),NULL)DBItest::test_all()This assumes thatKazam() returns an instance of yourDBIDriver class. Additional arguments todbConnect() are specified as named list instead of theNULL argument tomake_context(). Thedefault_skip argument tomake_context() allowsskipping tests that are not (yet) satisfied by your backend.
Further reading:
Detailed instructions invignette("DBItest")
The feature list in theoriginalproposal.
Please note that the ‘DBItest’ project is released with aContributor Codeof Conduct. By contributing to this project, you agree to abide byits terms.