Dear WebTest community,
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. I asked my teammate Mike to write up the
problem, since I can't explain it properly myself. I can add, though, that
disabling JS in the WebTest is not a good option with this newest version
of Dojo, because most of our buttons have JS, and they won't work without
it, so we can't work around this issue with disabling JS.

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.

I've been worried about WebTest since it hasn't been updated much the past
year or two. Is it dying out?
thanks,
Lisa

------ Forwarded Message
*From: *Mike Thomas <[email protected]>
*Date: *Mon, 9 Apr 2012 14:54:38 -0600
*To: *Lisa Crispin <[email protected]>
*Subject: *Issues with Dojo Canoo and using a CDN

Our application depends on the Dojo toolkit for a number of features.
 WebTest has never supported Dojo properly, but to date we've been able to
limp along by using workarounds to avoid major issues (for example, we
sometimes turn off JavaScript on certain tests to avoid Dojo/Canoo issues
(that is, if it doesn't cause other issues to do so).

We are attempting to convert our application so that it loads the Dojo
Toolkit from a CDN rather than from local sources.

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>


This makes management and upgrades much simpler for us.  However, it also
causes every WebTest test in our system to fail with a JavaScript error
since we include Dojo on every page, whether we use it or not (it's a
framework thing):

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)

Our pages work properly in browsers.


Our current version is 1762.  We realize that is an older version, so we're
trying to upgrade.  However, the upgrade (1812) fails differently.  Aside
from some unrelated issues, tests were running fine with the latest WebTest
release, but when test are run agains the CDN-enabled version of our system
we get a different failure.  This seems only to happen on pages that
actually USE Dojo, as opposed to version 1762 where any test of a page that
imported  Dojo would fail.


javascript error
Wrapped com.gargoylesoftware.htmlunit.ScriptException: Wrapped
com.gargoylesoftware.htmlunit.ScriptException: Wrapped
com.gargoylesoftware.htmlunit.ScriptException: Wrapped
com.gargoylesoftware.htmlunit.ScriptException: Wrapped
com.gargoylesoftware.htmlunit.ScriptException: Wrapped
com.gargoylesoftware.htmlunit.ScriptException: Wrapped
com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot read
property "value" from null (
https://ajax.googleapis.com/ajax/libs/dojo/1.7.2/dojo//parser.js#8)
line
0
javascript source
function (evt) { evt = evt || _3b7.event; if (_3ba || (evt.type ==
"readystatechange" && !_3b8[doc.readyState])) { return; } _3ba = 1; if
(_3b9) { doc.readyState = "complete"; } while (_3bb.length) {
(_3bb.shift())(); } }
failing line
javascript call stack
Wrapped com.gargoylesoftware.htmlunit.ScriptException: Wrapped
com.gargoylesoftware.htmlunit.ScriptException: Wrapped
com.gargoylesoftware.htmlunit.ScriptException: Wrapped
com.gargoylesoftware.htmlunit.ScriptException: Wrapped
com.gargoylesoftware.htmlunit.ScriptException: Wrapped
com.gargoylesoftware.htmlunit.ScriptException: Wrapped
com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot read
property "value" from null (
https://ajax.googleapis.com/ajax/libs/dojo/1.7.2/dojo//parser.js#8)


In the past, when we're run into oddbal Dojo errors in WebTest, we've
disabled JavaScript.  However, this is becoming more and more impractical
since many pages do at least a bit of simple Javascript to get things done.


So, if we don't upgrade, we can't convert to a CDN because the Dojo import
fails to work.  If we do upgrade we can't convert to a CDN because we get
random errors in dojo.js if a page uses Dojo.




-------------------------------------------------
*Mike Thomas
*Lead Architect, Engineering
ePlan Services, Inc
[email protected]
303-567-8936
-------------------------------------------------





------ End of Forwarded Message



-- 
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

Reply via email to