Learn R Programming

⚠️There's a newer version (1.8.2) of this package.Take me there.

DBItest

This package provides a considerable set of test cases which you can easily incorporate in your DBI driver package.

Usage

Install from CRAN via

install.packages("DBItest")

or the development version using

devtools::install_github("rstats-db/DBItest")

In your driver backage, add DBItest to the Suggests:. Then, enable the tests by running

devtools::use_testthat()
devtools::use_test("DBItest")

from your package's directory. 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 skip argument to test_all() allows specifying skipped tests.

See the package's documentation and the feature list for a description of the tests.

Copy Link

Version

Install

install.packages('DBItest')

Monthly Downloads

6,120

Version

1.4

License

LGPL (>= 2)

Maintainer

Kirill Müller

Last Published

December 3rd, 2016

Functions in DBItest (1.4)

DBItest-package

DBItest: Testing 'DBI' Back Ends
test_compliance

Test full compliance to DBI
DBIspec

DBI specification
test_connection

Test the "Connection" class
make_context

Test contexts
test_transaction

Test transaction functions
DBIspec-wip

DBI specification (work in progress)
test_getting_started

Getting started with testing
test_driver

Test the "Driver" class
test_meta

Test metadata functions
test_result

Test the "Result" class
tweaks

Tweaks for DBI tests
test_all

Run all tests
make_placeholder_fun

Create a function that creates n placeholders
test_sql

Test SQL methods
test_stress

Stress tests