DBItest v1.5-2
Monthly downloads
Testing 'DBI' Back Ends
A helper that tests 'DBI' back ends for conformity
to the interface.
Readme
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.
Functions in DBItest
Name | Description | |
make_placeholder_fun | Create a function that creates n placeholders | |
spec_connection_disconnect | spec_connection_disconnect | |
DBIspec-wip | DBI specification (work in progress) | |
DBIspec | DBI specification | |
spec_result_execute | spec_result_execute | |
spec_result_fetch | spec_result_fetch | |
DBItest-package | DBItest: Testing 'DBI' Back Ends | |
make_context | Test contexts | |
spec_result_clear_result | spec_result_clear_result | |
spec_result_create_table_with_data_type | spec_result_create_table_with_data_type | |
spec_result_send_query | spec_result_send_query | |
spec_result_send_statement | spec_result_send_statement | |
spec_meta_has_completed | spec_meta_has_completed | |
spec_meta_is_valid | spec_meta_is_valid | |
spec_sql_quote_identifier | spec_sql_quote_identifier | |
spec_sql_quote_string | spec_sql_quote_string | |
spec_meta_bind | spec_meta_bind | |
spec_meta_get_row_count | spec_meta_get_row_count | |
spec_result_get_query | spec_result_get_query | |
spec_result_roundtrip | spec_result_roundtrip | |
spec_sql_write_table | spec_sql_write_table | |
spec_sql_exists_table | spec_sql_exists_table | |
spec_sql_list_tables | spec_sql_list_tables | |
spec_driver_connect | spec_driver_connect | |
spec_driver_data_type | spec_driver_data_type | |
spec_meta_get_rows_affected | spec_meta_get_rows_affected | |
spec_meta_get_statement | spec_meta_get_statement | |
spec_sql_read_table | spec_sql_read_table | |
spec_sql_remove_table | spec_sql_remove_table | |
test_getting_started | Getting started with testing | |
test_meta | Test metadata functions | |
spec_transaction_begin_commit_rollback | spec_transaction_begin_commit_rollback | |
test_compliance | Test full compliance to DBI | |
test_connection | Test the "Connection" class | |
test_stress | Stress tests | |
test_transaction | Test transaction functions | |
test_data_type | test_data_type | |
test_driver | Test the "Driver" class | |
tweaks | Tweaks for DBI tests | |
test_result | Test the "Result" class | |
test_sql | Test SQL methods | |
spec_transaction_with_transaction | spec_transaction_with_transaction | |
test_all | Run all tests | |
No Results! |
Vignettes of DBItest
Name | ||
test.Rmd | ||
No Results! |
Last month downloads
Details
Date | 2018-01-26 |
License | LGPL (>= 2) |
LazyData | true |
Encoding | UTF-8 |
BugReports | https://github.com/rstats-db/DBItest/issues |
RoxygenNote | 6.0.1 |
VignetteBuilder | knitr |
Collate | 'DBItest.R' 'context.R' 'expectations.R' 'import-dbi.R' 'import-testthat.R' 'run.R' 's4.R' 'spec.R' 'spec-getting-started.R' 'spec-compliance-methods.R' 'spec-driver-constructor.R' 'spec-driver-class.R' 'spec-driver-data-type.R' 'spec-connection-data-type.R' 'spec-result-create-table-with-data-type.R' 'spec-driver-connect.R' 'spec-connection-disconnect.R' 'spec-result-send-query.R' 'spec-result-fetch.R' 'spec-result-roundtrip.R' 'spec-result-clear-result.R' 'spec-result-get-query.R' 'spec-result-send-statement.R' 'spec-result-execute.R' 'spec-sql-quote-string.R' 'spec-sql-quote-identifier.R' 'spec-sql-read-table.R' 'spec-sql-write-table.R' 'spec-sql-list-tables.R' 'spec-sql-exists-table.R' 'spec-sql-remove-table.R' 'spec-meta-bind-runner.R' 'spec-meta-bind-tester-extra.R' 'spec-meta-bind.R' 'spec-meta-bind-.R' 'spec-meta-is-valid.R' 'spec-meta-has-completed.R' 'spec-meta-get-statement.R' 'spec-meta-get-row-count.R' 'spec-meta-get-rows-affected.R' 'spec-transaction-begin-commit-rollback.R' 'spec-transaction-with-transaction.R' 'spec-driver-get-info.R' 'spec-connection-get-info.R' 'spec-sql-list-fields.R' 'spec-meta-column-info.R' 'spec-meta-get-info-result.R' 'spec-driver.R' 'spec-connection.R' 'spec-result.R' 'spec-sql.R' 'spec-meta.R' 'spec-transaction.R' 'spec-compliance.R' 'spec-stress-connection.R' 'spec-stress.R' 'spec-all.R' 'spec-.R' 'test-all.R' 'test-getting-started.R' 'test-driver.R' 'test-connection.R' 'test-result.R' 'test-sql.R' 'test-meta.R' 'test-transaction.R' 'test-compliance.R' 'test-stress.R' 'tweaks.R' 'utf8.R' 'utils.R' |
NeedsCompilation | no |
Packaged | 2018-01-25 19:46:48 UTC; muelleki |
Repository | CRAN |
Date/Publication | 2018-01-25 19:54:58 UTC |
imports | blob , DBI (>= 0.4-9) , desc , hms , methods , R6 , testthat (>= 1.0.2) , withr |
suggests | knitr , lintr , rmarkdown |
depends | R (>= 3.0.0) |
Contributors | RStudio, R Consortium |
Include our badge in your README
[](http://www.rdocumentation.org/packages/DBItest)