Re: [R] Unit Testing Frameworks: summary and brief discussion

From: <ml-r-help_at_epigenomics.com>
Date: Wed, 09 May 2007 18:23:29 +0200

anthony.rossini_at_novartis.com wrote:
[...]
> ============= From Seth Falcon:
>
> Hi Tony,
>
> anthony.rossini_at_novartis.com writes:

>> After a quick look at current programming tools, especially with regards 

>
>> to unit-testing frameworks, I've started looking at both "butler" and 
>> "RUnit".   I would be grateful to receieve real world development 
>> experience and opinions with either/both.    Please send to me directly 
>> (yes, this IS my work email), I will summarize (named or anonymous, as 
>> contributers desire) to the list.

>
> I've been using RUnit and have been quite happy with it. I had not
> heard of butler until I read your mail (!).
>
> RUnit behaves reasonably similarly to other *Unit frameworks and this
> made it easy to get started with as I have used both JUnit and PyUnit
> (unittest module).
>
> Two things to be wary of:
>
> 1. At last check, you cannot create classes in unit test code and
> this makes it difficult to test some types of functionality. I'm
> really not sure to what extent this is RUnit's fault as opposed
> to limitation of the S4 implemenation in R.

I'd be very interested to hear what problems you experienced. If you have any example ready I'd be happy to take a look at it. So far we have not observed (severe) problems to create S4 classes and test them in unit test code. We actually use RUnit mainly on S4 classes and methods. There are even some very simple checks in RUnits own test cases which create and use S4 classes. For example in tests/runitRunit.r in the source package.

> 2. They have chosen a non-default RNG, but recent versions provide a
> way to override this. This provided for some difficult bug
> hunting when unit tests behaved differently than hand-run code
> even with set.seed().
>
> The maintainer has been receptive to feedback and patches. You can
> look at the not-so-beautiful scripts and such we are using if you look
> at inst/UnitTest in: Category, GOstats, Biobase, graph
>
> Best Wishes,
>
> + seth
>
[...]

Best,

   Matthias

-- 
Matthias Burger                     Project Manager/ Biostatistician
Epigenomics AG    Kleine Praesidentenstr. 1    10178 Berlin, Germany
phone:+49-30-24345-371                          fax:+49-30-24345-555
http://www.epigenomics.com           matthias.burger@epigenomics.com
--
Epigenomics AG Berlin           Amtsgericht Charlottenburg HRB 75861
Vorstand:   Geert Nygaard (CEO/Vorsitzender),  Dr. Kurt Berlin (CSO)
               Oliver Schacht PhD (CFO),  Christian Piepenbrock (COO)
Aufsichtsrat:   Prof. Dr. Dr. hc. Rolf Krebs (Chairman/Vorsitzender)

______________________________________________
R-help_at_stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Wed 09 May 2007 - 16:30:12 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 09 May 2007 - 18:31:29 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.