Hi Dierk, We do not get JS errors in any browsers, we've tested in all versions of IE from 7 on up, Safari, FF, Chrome. So, I think the JS is valid.
Given that the tests pass with the earlier Dojo version, and do not pass with the later Dojo version, and the app works fine in all browsers, that really does seem like a WebTest problem. Or possibly HtmlUnit, though we are writing new tests in WebDriver which I think uses the same version of HtmlUnit, and those work fine with both versions of Dojo. We'll have to migrate off of Canoo WebTest, then. The developers here think that the newer Dojo approach is more robust and will make the product easier to maintain and update. I don't know enough to have an opinion, but since we have had a successful product for quite a few years now, I do trust them. But, we have our answer, WebTest isn't changing. So that's the information we need. Thanks. -- Lisa On Wed, Apr 11, 2012 at 3:33 PM, Dierk König <[email protected]> wrote: > Hi Lisa, > > > We're trying to upgrade to the latest version of Canoo WebTest, which > appears to still be 1812, and we already had issues with it that we were > working on. But tests that were passing fine using WebTest 1812 are now > failing since the upgrade of Dojo. > > So it worked before the Dojo upgrade, but not after? (at first, this > doesn't really sound like an _WebTest_ error to me ... ) > > > If there is no way to get around this in Canoo WebTest, I guess our only > option is to move to another test framework, which will take us a long > time, as we have 8 years' worth (and many thousands of test cases) of > WebTest scripts which, up to now, have provided us a lot of value in > regression test coverage. > > Your long-standing loyalty is much appreciated! > > > I've been worried about WebTest since it hasn't been updated much the > past year or two. Is it dying out? > > WebTest is a functional testing tool for HTML-based web applications. > This is what it addresses and what it does well. > There is hardly any bugs and the feature set is complete enough. > And since we do not release new versions just for the fun of it, there is > not much activity in that area. > > But if new issues come up, we are happy to tackle them. > > > We switched from: > > <script type="text/javascript" > src="/include/javascript/dojotoolkit/dojo/dojo.js"></script> > > to > > <script src=" > https://ajax.googleapis.com/ajax/libs/dojo/1.7.2/dojo/dojo.js" > djConfig="parseOnLoad: true"></script> > > An architectural remark: this means you went for dynamically assembling > your application from self-modifying code that is loaded from unreliable > source. > > Some people claim that this undermines the value of test-automation since, > e.g. the JS that you load from remote can change any time. > What you have tested against may be obsolete one second after the test has > finished without you knowing. > > > JavaScript error loading page > http://localhost:8080/home/index.jsp?&fid=2: Wrapped > com.gargoylesoftware.htmlunit.ScriptException: Wrapped > com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot read > property "firstChild" from undefined ( > https://ajax.googleapis.com/ajax/libs/dojo/1.7.2/dojo//parser.js#8) > > Well, it would be easier to tell with seeing the source code but obviously > some JS tries to read "firstChild" from a reference that is undefined. > Why is it undefined? I can only guess. Maybe some dependent remote JS > cannot be loaded. Why? There are a thousand possibilities; even invalid > certificates. > > If that is the case then I would be scared if my browser displays the page > without error (but, yes, some do). > > I'd advise to download the remote JS, store it on your local server, and > load it from there as you did before. (check the google license whether > this is allowed) > And, yes, dependency management means more maintenance work. > > cheers > Dierk -- Lisa Crispin Co-author with Janet Gregory, _Agile Testing: A Practical Guide for Testers and Agile Teams_ (Addison-Wesley 2009) Contributor to _Beautiful Testing_ (O'Reilly 2009) http://lisacrispin.com @lisacrispin on Twitter http://entaggle.com/lisacrispin

