On Fri, 2002-07-05 at 07:12, James Strachan wrote:
> When a test fails I often hack the code and keep running the same single
> test, until the code works again, then I'll run all the unit tests in one go
> to check I've not broken anything else. Up until now I end up adding all
> kinds of extra targets to build.xml files that just run a single test or
> sample program.
> 
> So how about we add some extra behaviour to the new 'maven' command to do
> things like, run a specific unit test. e.g.
> 
>     maven -t org.apache.commons.foo.FooTest
> 
> Which would invoke the goal 'maven:run-singletest' (or whatever) passing in
> the name of the class to run from the command line. We could even help the
> user avoid too much typing by allowing some kinda pattern matching to find
> the test(s) to run. e.g.
> 
>     maven -t *FooTest

+1
 
> 
> It might be nice to do a similar thing for running arbitrary sample programs
> as well. We could have a maven:run-program target which is similar to the
> run-singletest but just runs a main() method. For example
> 
>     maven -p *MyProgram
> 
> to run a sample program, maybe passing in further command line arguments.
> 
>     maven -p *MyProgram foo.txt
> 
> Then Maven could become more than just a build system, it could be a simple
> & flexible launchpad for test cases and sample programs. No more messing
> around with non-portable shell scripts or messing with the classpath!
> 
> I understand the above is all possible by creating new goals in your
> maven.xml file; though I just thought it'd be nice to automate this, via
> command line options.
> 
> Thoughts?

I like the idea. We could have a little alias file for command line
options that could take care of mapping options to operations. I think
that would be rather nifty. We could have some core options, and also
allow users to customize some of their own options, or macros written in
jelly.

> James
> 
> 
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
-- 
jvz.

Jason van Zyl
[EMAIL PROTECTED]
http://tambora.zenplex.org

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
  
  -- Jacques Ellul, The Technological Society


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to