Philippe 'BooK' Bruhat wrote:
Le mardi 15 novembre 2005 à 15:23, Chris Dolan écrivait:
After reading some of the insightful comments posted on my blog, I've
been convinced that the private tests should be included in the CPAN
distribution, but disabled in some way (perhaps via a file extension
other than .t?). That way, resourceful or interested users can run
the tests but average users don't need to.
What about a special environment variable, like RUN_PRIVATE_TESTS?
I've been working on a concept of taggable tests on some of my larger
commercial stuff, integrating with the Test::More skip() function, and
some form of environment variables does indeed seem the best way to do
such a thing.
For example, with applications that talk to the database, a lot of the
time I want to be able to just test all the code that doesn't need a
live production database, or need a database with the production schema,
or need a schema that it is allowed to modify, and so on and so forth.
So I have a bunch of environment variables like TEST_TAG_DB_RO
TEST_TAG_DB_RW, TEST_TAG_DB_SCHEMA and so on and so forth.
It seems to be working OK, I'm sure there's be a Test::Tags module in a
year or something.
Adam K