|There's more than one way to do things|
Re^5: Test::Class and test organizationby xdg (Monsignor)
|on Mar 22, 2006 at 05:54 UTC||Need Help??|
It sounds like what you really may need is something along the lines of Test::Trait (not yet written) rather than Test::Class.
When I was writing tests to fix Sub::Uplevel, I needed to test a lot of variations of nested regular and upleveled function calls. As I had just read Higher Order Perl, I realized that my test cases could be described by a tree, so I wrote a recursive function to generate and check all my test cases. While the patch isn't incorporated yet, the problem and patch are posted on RT.
If you think your problem is really N-dimensional -- meaning that you want to test all the combinations of individual variations you described, then you might want to consider doing something similar and just traverse all the combinations.
I think the challenge will be trying to describe the test variations sufficiently orthogonally that you can easily combine them. (E.g. concurrent access can't be toggled on/off as easily as key filters.) I think you're going to want to figure that out before worrying about organizing your test files and data.
Personally, my initial thought on this is to implement the core discrete tests in a utility module. Then I would create a test script along these lines:
Of course, the core test utility would need to know what to do with the various toggles.
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.