Just toying with the possibility of adapting Google Gears tests to
FireUnit. I don't like Gear's test harness as it seems far too quite
complicated. Also they don't seem to run one publicly.
> After executing testArguments I get this odd error message from
> fireunit.js:989
> "str.replace is not a function"
The problem is that you are passing a function into fireunit.ok
instead of a string.
The second parameter 'x' should be a string for fireunit.ok method:
(fu_geo.html, line 39)
assertError = function(x) { fireunit.ok(false, x) };
But geolocation_test.js uses the assertError method as follows:
(geolocation_tests.js, e.g. line 49)
assertError(function() {
geolocation.getCurrentPosition();
});
Also line fu_geo.html, line 42 needs following fix:
fireunit.testDone();
> Just toying with the possibility of adapting Google Gears tests to
> FireUnit. I don't like Gear's test harness as it seems far too quite
> complicated. Also they don't seem to run one publicly.
testZeroTimeout could be perhaps replaced by setTimeout but,
startAsync and completeAsync are not supported (at least no for now).
Every test is just finished with fireunit.testDone() method.
Honza
On Jan 12, 5:27 pm, Kai Hendry <kai.hen...@gmail.com> wrote:
Try to load your start.html file using file:// protocol (directly from
local disk).
The page should start local HTTP server and automatically reload
itself using
http:// and launch all specified tests step by step.
Honza
On Jan 13, 12:47 pm, Kai Hendry <kai.hen...@gmail.com> wrote:
I have loaded the start.html file into browser (where Firebug and
Fireunit is installed) I.e.: file:///C:/.../start.html
All tests for the commandline.html has been launched, the Test panel
has been
activated at the end showing all (40) results.
> When I type fireunit.forceHttp() on the console I get:
If I load the commandline.html file (again using file:// protocol) and
put fireunit.forceHttp() into the Firebug's command line all tests
from the file are executed.
Now I was hoping you could comment on a testing problem at work.
I need to automate Javascript tests as much as possible on mobile
devices, testing a plugin. Testing the plugin on the desktop (Firefox)
with FireUnit is fine.
Though I need to test also on really limited mobile platforms such as
Pocket IE on Windows Mobile (JQuery does not work). The only other
testing framework that actually seems to work on such devices is the
Gears one.
However it feels a little complex to me and it depends on some Gears
plugin functionality (I think) to actually work. So I've attempted to
strip down the assert libraries like so http://static.webvm.net/unit/foo.html Which will stop processing on the first error currently.
So the idea I had is to tell testers to write in the Google Gears unit
test style. Kinda get it working with the Gears harness or my crappy
cut down new assert library http://static.webvm.net/unit/new-assert.js.
And when testing on desktop, I recommend using a FireUnit adaption
type technique.
Does that reasonable? Perhaps what I am really enquiring about is that
if you had any visions of a FireUnit lite or is that Qunit?