Brett Porter wrote:
Hi,

I wanted to get some feedback from other devs on this topic.
Historically, I think we've done very little of both and would like to
change that. But most of the tests cropping up seem to be integration
tests, because they are probably an easier mechanism than to setup the
preconditions of the plugin. However, they are much larger in terms of
creation, checkout space and time to run.

We have turned to the integration in the recent past because they more closely represent what the user will experience. Done more out of a sense of expediency and because it is somewhat difficult right now to quickly because of some of things people have mentioned in that we don't have an easy harness for many of the components.

I'd like to see that we "unit test" to the greatest extent possible.
IMO, the only reason to go to integration tests is to test lifecycle
interactions and interactions with other plugins.

We should have plenty of both but to me the integration is the final word on what a user should experience. The symptom here is the decline of unit testing but in a lot of places for me the cause is that the components I'm trying to test are so course that in a short time span it is hard to test a component for which the source is ~1200, ~1400, ~1600 lines long. Namely the plugin manager, project builder and life cycle executor. These are some of the most important components and they are not easy to follow and therefore not easy to test. I feel that's one of the root causes of why more unit testing is not happening. I ran out of time during the last release because I've not been in the core for a while and the project builder is just so big so I punted and made an integration test.

What we probably require to do this is convenience methods to construct
a decent project and settings object and an expression populator based
on the project and settings.

The convenience methods and harnesses will certainly help and I think we've got quite a bit of code for that. What would also be cool is to align the components we have in MNG with some archetypes for unit testing components of that particular flavour. Constructed in such a way that they can be isolated and easily attached to a JIRA issue while at the same time be easy to integrate in the existing suite of tests.

- Brett

--

jvz.

Jason van Zyl
jason at maven.org
http://maven.apache.org

First, the taking in of scattered particulars under one Idea,
so that everyone understands what is being talked about ... Second,
the separation of the Idea into parts, by dividing it at the joints,
as nature directs, not breaking any limb in half as a bad carver might.

  -- Plato, Phaedrus (Notes on the Synthesis of Form by C. Alexander)

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

Reply via email to