How to categorize my tests?

Hi friends,

I decided to categorize my tests into 4 not necessarily disjoint sets:

1. unit tests: Quicky unit tests

2. slow tests: unit tests that does not run enough fast for continuous builds

3. acceptance tests

4. all tests: Including all categories I mentioned before.

Now what is the best way to define these categorization in your opinion? some options may be:

1. different folders for each one

2. differentiation in names (e.g. MyClassSlowTest or MyClassAcceptanceTest ....)

3. using annotations in source to specify each category (e.g. @slow says to ant that this is not a needed tests in run-fast-unit-tests target...)

4. using a properties/config file (Oh I should remember to edit this each time I add a test, sough)

5. a combination of some of the above ways!!!

Now please share your valuable opinions with me. Your notes are so appreciated :)

[976 byte] By [Achchana] at [2007-11-26 15:58:07]
# 1
how about using TestSuites? a TestSuite is a TestCase, so it can be run by junit, and all it does is collate a bunch of TestCases, such as you're proposing
georgemca at 2007-7-8 22:19:08 > top of Java-index,Java Essentials,Java Programming...
# 2

Thanks georgemc ,

I thought about TestSuits but unfortunately there are some problems with it:

1. I should add any test case into proper testSuit everytime I write a test. This is the same as keeping the list of tests in an external xml/text file.

2. We have decided to use Ant's batch unit test feature for a reason that I don't recall now!!! You see I have a bad memory leak ;)

Thanks again.

Achchana at 2007-7-8 22:19:08 > top of Java-index,Java Essentials,Java Programming...