[Vtigercrm-developers] automated tests update

Matthew Brichacek mmbrich at fosslabs.com
Mon Jul 17 17:13:46 PDT 2006


On Mon, 2006-07-17 at 18:53 -0400, Jeff Kowalczyk wrote:
> Matthew Brichacek wrote:
> > I haven't looked into Selenium yet but with JS does it work at the
> > source level only, does it use gecko to actually execute and evaluate
> > the JS or can it check for changes in the DOM like it does the source?
> > In 5.x there are quite a few places where the DOM is being manipulated
> > directly or indirectly and I don't think a source level verification
> > tool will catch most of those.
> 
> Selenium directly drives the browser as if the user were clicking it. The
> demo http://www.openqa.org/selenium-core/demos.html illustrates the
> concept.
I tried this out and did a little digging in the Core and IDE.  From the
looks of it, Selenium can handle a _lot_ of the javascript testing we
would need, if not all of it.

> 
> > Maybe augmenting it with the scriptactulous unit test lib would work?
> > http://wiki.script.aculo.us/scriptaculous/show/UnitTesting
> 
> Unit tests in the client and server-side source would be enhancements, to
> be sure. However, I am skeptical about trying to retrofit unit test
> coverage to a large code base. The community would have a hard time
> achieving useful code coverage unless there were tests for *everything*,
> starting from early in the project.
> 
> Selenium's end-result testing, and the fact that such tests can be
> recorded for submission by even novice users, would be an efficient use of
> limited community resources. If the testing fever strikes the community,
> perhaps all new code could be required to have unit tests, and so on.
I had thought of this before too but my experience in requiring unit
tests has not been good :).  In the CGL project we tried to enforce a
rule like this and it was shot down almost before it left the ground.
In a PoC environment like that it's understandable but I think even in
the case of vtiger the fever would have to be HOT to get everyone on
board.

Matt




More information about the vtigercrm-developers mailing list