[R] Test Driven Development in R
Jose Quesada
quesada at gmail.com
Sat Jan 31 14:20:45 CET 2009
Hi,
I wonder what kind of interest there is on Test Driven Development (TDD) in R.
Test Driven Development consists of writing the test before the function, and
iteratively build the function until it passes the test.
Python and Ruby (specially Ruby) have very strong test-oriented cultures. In
fact, in Ruby at least the custom is to do TDD and lately Behavior-driven
development (BDD). In BDD, one writes a story of what one would want the code to
do. This story is almost native English, and then the test suite converts it
into something that the language understand as tests.
There are some posts on the list about this, but they are about testing in
general (Runit), not TDD. Example:
http://thread.gmane.org/gmane.comp.lang.r.general/85047
Recently, I found there is an alpha, but working implementation of TDD for
Komodo edit:
www.sciviews.org/SciViews-K/index.html
The editor has a green bar that becomes red as soon as one edits a function, and
that edit breaks the tests. This is tremendously useful.
Using Gmane search, the only mention I could find on svUnit was:
http://thread.gmane.org/gmane.comp.lang.r.general/136632/focus=136662
I think this could make a great UseR 2009 talk. Ideally, by someone with more R
experience than me, and even more ideally by Philippe Grosjean :), but it push
comes to shove, I could prepare such a talk.
Would this be interesting at all? Are there any resources that I have missed?
How many people are using this kind of testing or Komodo -sciViews at all?
Best,
-Jose
--
Jose Quesada, PhD.
Max Planck Institute, Human Development, Berlin
http://www.josequesada.name/
More information about the R-help
mailing list