You are right about some of my unit test's being more oriented to being Integration tests. But regardless of that, some larger projects that have a 100's of tests, it still adds up to an appreciable amount of time to run. Now, from the tone of the emails, I think everyone agree's that they would run all the tests, including the various slower integration tests before producing a "deliverable". But often you are not testing a deliverable. When i change something small in my web app that then has to be deployed as part of a war, adding in the testing time becomes a pain, and (as Henning points out) leads to having a larger and larger list of excluded test cases!
A tenet of Agile development is to use what works for you, and discard the rest. While I appreciate that Maven faciliates, and even encourages good development practices, I don't think it should enforce a set of specific practices. It does sound like a lot of people would like to be able to control the level of testing. Proposed was a very static "ON/OFF" property. However, what would be ideal is to declare various set's of tests, and be able to declare which set to run. That way you could declare an empty set, when you don't want any tests to run, which is what I think you are proposing as well. Having said that, I think the ON/OFF is a quick solution for the short term until the more sophisticated solution is found. Eric -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 21, 2003 10:31 PM To: Turbine Maven Users List Subject: Re: Mechanism to skip tests [EMAIL PROTECTED] writes: > I posted an email a while ago about that as well.. I would love to be able > to call maven java:jar -ignore test:test etc.... For the same reasons you > have specified. Purists have said that you should ALWAYS run tests, but > when they slow you down too much, they are just ignored. I think being able > to selectively turn them on and off would be great. > > Eric I may be a *purist* since I do believe that before a deliverable is built you should have all the tests passing. Why are your test so slow? Maybe they are not unit tests? I propose that maven ( or a plug-in ) handle another ( maybe even more than one ) level of testing instead of a toggle switch for unit tests. The unit tests ( fast, independent ) would be hitched into java:jar as they currently are. But some tests are more *integration* type tests ( slower with external dependencies ) that may be *not* be required to run on each build. Currently my criteria for these types of tests are speed and dependencies. Tests that require the database, other projects deliverables in a reactor type environment, or sometimes even tests that use the file system for data or processing are some examples. > -----Original Message----- From: Colin Sampaleanu > [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 21, 2003 2:31 PM > To: Turbine Maven Users List Subject: Mechanism to skip tests > > > Is there an easy mechanism which I have missed to allow tests to be > skipped when performing a target (such as java:jar) which has a > dependency on test:test? I've looked at the source for the test and java > plugins and can't see anything. > > Generally you do want to run tests when building a jar (or some artifact > farther down the dependency chain). But it is also a pretty common > occurrence that you want to do that target without executing tests, e.g. > when you have just changed a property file, etc., and you know it will > not affect tests. I realize that 'maven.test.failure.ignore' is > available, but that just skips failing if the tests don't run, I am > looking for something which allows skipping the running of tests. > > Generally, I think you should be able to set whether tests are compiled > by default, and allow that value to be toggled easily at runtime, and > then a similar mechanism to set whether tests are executed by default, > and allow that value to be toggled easily at runtime. This should also > work for the reactor. > > Does anybody agree or have comments? -- ===================================================================== Jeffrey D. Brekke [EMAIL PROTECTED] Wisconsin, USA [EMAIL PROTECTED] [EMAIL PROTECTED] -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
