Skip to content
Testing DBI drivers
R Other
  1. R 99.4%
  2. Other 0.6%
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
R Add example Dec 15, 2019
examples
man
revdep-dev
revdep add results May 2, 2018
tests
vignettes
.Rbuildignore
.gitignore Ignore Dec 15, 2019
.lintr
.travis.yml
CODE_OF_CONDUCT.md
DBItest.Rproj
DESCRIPTION
LICENSE.md
NAMESPACE
NEWS.md Bump version to 1.7.0.9000 Dec 17, 2019
README.md
_pkgdown.yml
appveyor.yml
codecov.yml
cran-comments.md
tic.R

README.md

DBItest

Travis-CI Build Status AppVeyor Build Status Codecov test coverage CRAN_Status_Badge CII Best Practices

This package is primarily useful for developers of DBI backends. It provides a considerable set of test cases for DBI backends. These test cases correspond to the DBI specification. Please follow the steps below to add these test cases to your DBI backend.

Installation

Install from CRAN via

install.packages("DBItest")

or the development version using

devtools::install_github("r-dbi/DBItest")

Usage

In your driver backage, add DBItest to the Suggests: and enable the tests. Run the following code in you package's directory:

# install.packages("usethis")
usethis::use_package("DBItest", "suggests")
usethis::use_test("DBItest")

This enables testing using testthat (if necessary) and creates, among others, a file test-DBItest.R in the tests/testthat directory. Replace its entire contents by the following:

DBItest::make_context(Kazam(), NULL)
DBItest::test_all()

This assumes that Kazam() returns an instance of your DBIDriver class. Additional arguments to dbConnect() are specified as named list instead of the NULL argument to make_context(). The default_skip argument to make_context() allows skipping tests that are not (yet) satisfied by your backend.

Further reading:

  • Detailed instructions in vignette("DBItest")

  • The feture list in the original proposal.


Please note that the 'DBItest' project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

You can’t perform that action at this time.