forked from RevolutionAnalytics/quickcheck
-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.Rmd
63 lines (50 loc) · 3.2 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
output:
html_document:
keep_md: yes
---
```{r, echo=FALSE}
library(knitr)
opts_chunk$set(echo=TRUE, tidy=FALSE, comment="", cache=FALSE, error=FALSE)
```
quickcheck
==========
This package provides support for randomized software testing for R. Inspired by its influential [Haskell namesake](http://www.eecs.northwestern.edu/~robby/courses/395-495-2009-fall/quick.pdf), it promotes a style of writing tests where assertions about functions are verified on random inputs. The package provides default generators for most common types but allows users to modify their behavior or even to create new ones based on the needs of a each application. The main advantages over traditional testing are
* Each test can be run many times, with better coverage and bug detection.
* Tests can be run on large inputs that would be unwieldy to include in the test source or would require addtional development.
* Assertions are more self-documenting than individual examples of the I/O relation, and in some instances can amount to a complete specification for a function.
* The developer is less likely to incorporate unstated assumptions in the choice of test inputs.
Additional features include the `repro` function that supports reproducing and debugging a failed test. For additional information, see the [tutorial](docs/tutorial.md). For support, we are [monitoring](http://stackoverflow.com/questions/tagged/r+quickcheck) tags [R] [quickcheck] on [Stackoverflow](http://stackoverflow.com). Please remember to add *both* tags to your question. For new releases, subscribe to `quickcheck`'s Release notes [feed](https://github.com/RevolutionAnalytics/quickcheck/releases.atom) or by [email](https://feedburner.google.com/fb/a/mailverify?uri=ReleaseNotesFromQuickcheck&loc=en_US)
To install, first install and load `devtools`
```
install.packages(devtools)
library(devtools)
```
```{r, echo= FALSE}
library(httr)
version = content(GET("https://api.github.com/repos/RevolutionAnalytics/quickcheck/releases"))[[1]]$tag
```
Then, to install from source:
```{r, echo=FALSE, comment=""}
cat(
paste0('install_github("rzilla/quickcheck@', version, '", subdir = "pkg")
'))
```
Linux package:
```{r, echo=FALSE, comment=""}
cat(
paste0('install_url(
"https://github.com/rzilla/quickcheck/releases/download/', version, '/quickcheck_', version, '.tar.gz")
'))
```
Windows package:
```{r, echo=FALSE, comment=""}
cat(
paste0('install_url(
"https://github.com/rzilla/quickcheck/releases/download/', version, '/quickcheck_', version, '.zip")
'))
```
```{r, echo=FALSE, results='asis'}
cat("The current version is", version, ".")
```
While this package was first developed to support the activities of the RHadoop project, it's not part of it nor related to Hadoop or big data. While it has been in use for a few years to test packages used in production, version 3.0.0 marks the first version of the project that's offered for general use and as such it went through a major API re-design. Hence, versions 3.x.y should be considered beta releases and no backward compatibility guarantees are offered, as it is customary in [semantic versioning](http://semver.org) for 0.x.y releases. We will switch to the normal major/minor/hotfix releases from version 4.