The ability to just run a single testcase sounds useful.
Have you checked how the JBossAS tests (/testsuite) organizes it?
If might be nice if we could have the same syntax.
I agree, the fewer variations we have to memorize for acheiving the same end, the better.
I'll take a peek at the testsuite as soon as I get a chance.
Charles (et al),
I looked at 'testsuite' to see what mechanism is used to run a single test. All I can find is a target named 'one-test' that executes the class denoted by the setting of the property 'test', as stated in the link you provided, above.
So, the syntax would look like:
cd testsuite build one-test -Dtest=org.jboss...myClassTest
I also took a closer look at my use of the term "test-case", and decided "test-suite" or "test-class" would be a better description. The 'test' element in a task allows execution of a single class file. As far as I can tell, the junit task doesn't support only invoking a single test method within a class.
So, shall it be "test"? And should this be a target? That weighs in a lot more than my one-liner, but is more flexible.
The syntax should be the same as 'testsuite', i.e. we should have a 'one-test' target and you specify a '-Dtest=....' argument to indicate which test class to run.
While this will be more than one-line, I'm thinking it shouldn't be too much more, and will keep us consistent with the mother-ship which is a "Good Thing".
Further down the line JBoss Build may be extended to provide a default one-test target available to all projects, but until then we will have to make do with our own implementation. In fact you should feel free to add a feature request for this to the JBoss Build project...
I have implemented the feature as suggested in the previous post.
I also submitted a feature request to JBossBuild:
Bob the dinosaur