tests/README.md

Testing protocols

At present lme4 uses two different testing protocols:

There are some unique challenges in testing a package like lme4 that does numerical computations:

if(lme4:::testLevel() >= *) { ... }

where that gets the value of an environment variable LME4_TEST_LEVEL if defined as a number and '1' otherwise, and so specify the default testing level. The general idea would be that 1=default=quick (for CRAN compliance, tests running in a few seconds or less); 2=fairly quick (tests running in <10 seconds); 3=moderate (tests running in <30 seconds); 4=long/exhaustive. LME4_TEST_LEVEL could be set less than 1, or zero, or negative, if we wanted really quick tests. * at present this is implemented at the level of each .R file, and indeed even at a finer level, by putting if (testLevel-condition) {} blocks in the file. It might be nice to have something more global, but this granularity is convenient too. * the Rout.save results will differ according to test level: we can either make sure that results are saved at the CRAN default level, or use .Rbuildignore to make sure the Rout.save files stay off CRAN entirely.



lme4/lme4 documentation built on April 24, 2024, 5:51 p.m.