Hello Cameron
In reply to your general question, I do believe that OFBiz is eminently testable, in that you can identify distinct pieces of functionality at various levels and test them by automatic means.
good to hear that
Re David's point about the need for practical intervention and not just talk, I did in fact offer to help with this (improvements to the testing framework) a while back. However the feedback I got from David and others to the suggestions I made (before I implemented them) was basically nil.
:(
Given this lack of interest, I left it for the moment, however in the next couple of months I will have to improve the test framework anyway for my company's internal purposes and I would be happy to contribute that back to OFBiz.
cool !!!
Meanwhile, I suggest that the best way to go forward would be to look at the existing tests and work out how to use the framework from there, as there does not appear to be any up-to-date documentation. Basically the starting point is the ofbiz-component.xml file for a particular module, which points at unit test definition files, via a <test-resource> tag. (I am away from the office at the mo so cannot check the exact tag name).
OK, that seems a good place to start
If you have specific problems using the framework, post them here and I will respond, but, like David, I am not up for general testing discussions.
OK, point taken
Pretty much everything general there is to say, has been discussed already on the mailing list archives
:D there's always more :D thanks for the tips! regards Wojtek
cameron > Wojtek, > > While it's great that Jacques has answered and > shared his thoughts > and experience on this, please don't consider that a > full > representation of the state of testing in OFBiz. > > You should know that testing has been considered > since day 1, but to > date I personally have not had a single client > willing to sponsor any > sort of testing effort. Combine this with the fact > that the framework > is made up mostly of business-level tools and we are > fortunately in a > place where there are few low level bugs that > require low-level unit > tests. We still definitely have a need for 2 things > in the testing area: > > 1. regression testing for applications, mostly on > the service level > (even if driven through the web-based UI) > 2. tools and infrastructure in place for > pre-development acceptance > testing > > Note that there is already a pretty good test > infrastructure in place > and it is used right now to run the JUnit tests for > various of the > framework components (mostly the entity and service > engines). It just > needs to be extended to support easy execution of > testing scripts > created by other tools. The main ones we are > considering are Grinder > and Canoo WebTest. > > Whether you use OFBiz or not is your choice and if > it works well for > you, great, if not that's fine too. > > A lot of people talk about testing, but so far > little has been > contributed in this area, largely I think because it > has always been > a nice to have, and no one with sufficient resources > has invested > sufficiently in it. That's really all it comes down > to. I developed > the current testing framework in the testtools > component and while > functional for junit tests it is far from complete. > I have nothing > else to invest in this as other obligations with > higher priority > won't allow it, so help from others is, as with most > things, necessary. > > But yes, OFBiz is inherently testable and includes a > great deal of > functionality for creating and automatically running > sets of tests. > There are even nice tools built around the entity > engine for adding > data to the database and asserting that the data in > the database > matches a certain state. > > -David > > > On Jan 15, 2007, at 3:45 AM, Wojciech Biela wrote: > > > Hello > > > > I recently looked at ofbiz and am now evaluating > whether or not we > > should go with it or not. We are a software > development company. > > > > The key thing for me at this point is testability > (both unit- and > > functional-level). I have a great concern because > I hear that only > > recently people are starting to think about it on > the ofbiz list, and > > the project dates back to 2001, so there is a > whole lot of legacy code > > that is not tested in any (automated) way? > > > > I read Cameron Smith's post from Nov 1 2006 "More > on testing > > framework" where he said that he had "Unit Tests > proper - run as JUnit > > tests", could any of you (or you Cameron) > elaborate a bit about those > > tests in the context of ofbiz > > - how painful was it > > - what components did you test > > - what things did you mock > > - what do you suggest > > > > Unfortunately I didn't find this information in > the documentation and > > a preliminary google search on this subject didn't > reveal any > > revelations either. I only found that you are > taking about functional > > testing. But then I ask what about unit level > tests? I see junit.jar > > in the sources but I then again I see the build > process does not > > invoke unit tests (there is a separate ant task > for it), I read that > > there is a total of 24 unit tests.... There was > some info that the > > topic is covered in the advanced (commercial?) > documentation by > > Undersun, is there anything apache-licenced ;) on > that? > > > > Is the architecture of ofbiz testable or not ? Is > it possible to write > > unit test (i.e. isolated unit tests) as well as > integration tests > > (also through junit). > > > > This is very important to me as we try to follow > the Test-Driven > > Development practice and thus testability is the > key concern to me. I > > like very much what you've done here, but I am > afraid whether we will > > be able to safely play around with it and alter it > for our customer > > without killing it. > > > > Concerning functional and acceptance testing have > anyone considered > > using FitNesse, it's a really glamorous tool for > holding acceptance > > criteria and running them against the system under > test, additionally > > it's a great collaboration tool (it's a wiki). If > you really really > > (as in: you rarely should) need to check some > things though the > > browser interface then there are perfect examples > of calling Selenium > > from FitNesse if anyone is interested I may point > you to such > > materials. > > > > This is especially important if you would like to > clearly specify > > functionality (define acceptance tests) ahead of > implementing this > > functionality, recording stuff with the Selenium > recorder is more or > > less fine for legacy stuff but that's not always > the case. > > > > BTW please tell me how hard will it be to degrade > the process of > > adding products, promotions to something simpler, > our client wants > > some specific bits of what I see in the demo app, > so I'm thinking > > about simplifying things for him as his main > request is simplicity. > > > > Wojtek Biela > > www.exorigo.pl > > ___________________________________________________________ What kind of emailer are you? Find out today - get a free analysis of your email personality. Take the quiz at the Yahoo! Mail Championship. http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk
-- Wojtek Biela
