DBItest v1.3

0

Monthly downloads

0th

Percentile

by Kirill Müller

Testing 'DBI' Back Ends

A helper that tests 'DBI' back ends for conformity to the interface, currently work in progress.

Readme

DBItest Travis-CI Build Status AppVeyor Build Status CRAN_Status_Badge

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.

Functions in DBItest

Name Description
DBItest-package Testing 'DBI' Back Ends
test_getting_started Getting started with testing
test_result Test the "Result" class
test_driver Test the "Driver" class
test_meta Test metadata functions
test_connection Test the "Connection" class
test_sql Test SQL methods
test_all Run all tests
test_compliance Test full compliance to DBI
tweaks Tweaks for DBI tests
No Results!

Last month downloads

Details

Date 2016-07-07
License LGPL (>= 2)
LazyData true
Encoding UTF-8
BugReports https://github.com/rstats-db/DBItest/issues
RoxygenNote 5.0.1
VignetteBuilder knitr
Collate 'DBItest.R' 'context.R' 'expectations.R' 'import-dbi.R' 'import-testthat.R' 'run.R' 'test-all.R' 'test-getting-started.R' 'test-driver.R' 'test-connection.R' 'test-result.R' 'test-sql.R' 'test-meta.R' 'test-compliance.R' 'tweaks.R' 'utf8.R' 'utils.R'
NeedsCompilation no
Packaged 2016-07-07 09:55:10 UTC; muelleki
Repository CRAN
Date/Publication 2016-07-07 13:36:27

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/DBItest)](http://www.rdocumentation.org/packages/DBItest)