All great points, Reinier. A few comments:
On Mon, Mar 7, 2011 at 5:22 PM, Reinier Zwitserloot <[email protected]>wrote: > > Jetty's config is XML, but if you read between the lines of the > documentation, its pretty obvious its all just XML versions of java basics > (method calls, mostly), and, yup, you can do all that in plain old java too. > Yes, this is a very powerful combo and one I insisted on putting in TestNG since day one. TestNG's XML format has a full bijection toward a very simple JavaBean like API: <suite name="foo"> <test name="bar"> ... XmlSuite s = new XmlSuite("foo"); XmlTest t = new XmlTest(s, "bar"); This is incredibly powerful and it basically gives you your cake and eat it too. Being able to reconfigure without compiling is very important (one of the main reasons that made me write TestNG was that I was tired of renaming my test methods with a leading underscore so that JUnit would ignore them), but offering this ability programmatically opens a lot of doors as well: - Creation of configurations based on dynamic factors (e.g. what if you want to run ten <test> tags, each with a different name and different parameters?). - Easy to embed (a lot of people run TestNG directly inside their container, sometimes even inside a servlet). - Ease of testing. - Ability to switch from a physical file to a memory model whenever is convenient. Interestingly, this is exactly where Eclipse is headed with e4 being entirely based on EMF. There again, it's mostly a modern reinvention of the JavaBeans+Listener approach but they added a lot of convenient stuff that really will make me think twice next time I want to roll my own internal model (I most likely won't and I'll just add a dependency on EMF, the benefits are too great to pass up). As for your other point about going against the grain: absolutely. Friction can kill you in this business and I think the mark of a true professional is one that picks her tools because they are the best for the job and not because they are her favorite. -- Cédric -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
