GithubHelp home page GithubHelp logo

michaelquinn32 / dbitest Goto Github PK

View Code? Open in Web Editor NEW

This project forked from r-dbi/dbitest

0.0 1.0 0.0 2.74 MB

Testing DBI drivers

Home Page: http://dbitest.r-dbi.org

License: GNU Lesser General Public License v2.1

R 98.88% Makefile 0.74% Shell 0.38%

dbitest's Introduction

DBItest

rcc 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 package, 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 feature 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.

dbitest's People

Contributors

dpprdan avatar hoesler avatar imanuelcostigan avatar jimhester avatar jonmcalder avatar krlmlr avatar michaelquinn32 avatar thrasibule avatar tschiefer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.