Re: DNA TCK?
Leo Simons <[email protected]> Fri, 09 Jan 2004 14:36:36 +0100
| Newsgroups | gmane.comp.java.jcontainer.interest |
|---|---|
| Message-ID | <[email protected]> |
peter-4lf8KW9E9MLMqX/[email protected] wrote: > From what I understand you are looking for a way to validate the container > correctly supports DNA components? yep. > If so then there is nothing right now > that does that. It would something useful to have but we just have not got > around to doing it. I guess what we would need to do is have something that > generated components that had > > * all the different combinations of lifecycle interfaces > * verified lifecycle stages called in correct order > * verified that all resources passed in were non-null > * verified that all the resources passed in matched corresponding metadata > (ie conformed to schema, had correct resources present, etc) and I'm sure more bullets will be found :D > However it becomes very difficult to test other things like whether the > component is protected against accessing things that it didn't declare, > whether the components that dont pass verifier checks are allowed etc. I'm sure it can be done. Maybe you could have several "bad" components, and some abstract test cases of some sort that tries to load them into the container. You then use some kind of "invocation recorder" inside each component that records the component state. Container implementors could either use the abstract testcase (perhaps exporting a container and importing it in the test with a stub container API of some sort), or implement their custom testcase that results in the same states in the invocation recorders. > I dunno. How do you see it working? never really built something like this before, so I don't know yet. But I think it can be done (Sun has a J2EE TCK, don't they? And that's some complex rules as well :D). I'm relatively sure a TCK can be developed using baby steps, just like everything else... Atm I'm just figuring out if there's enough interest (and perhaps people who feel like helping out). It's a bit silly to build a big kit, then have no-one who wants to test their container passes the test :D. I'm likely to tackle the simpler stuff first (maybe I'll try and refactor the pico TCK to run without requiring the PicoContainer interface, for example). cheers, - LSD