dogtail-devel gedit tests



[cc'ed to dogtail-devel-list]

I enjoyed reading your blog today, and decided to have a go at
implementing some of the test cases you proposed here:
http://live.gnome.org/Gedit/TestCases

I implemented test 1 and test 3 from your list, and comitted the result
here:
http://cvs.gnome.org/viewcvs/dogtail-tests/gedit/gedit-saving-tests.py?view=markup

It uses the gedit.py wrapper you wrote, which I imported into CVS here:
http://cvs.gnome.org/viewcvs/dogtail/dogtail/apps/wrappers/gedit.py?view=markup

As as experiment I tried using the python unittest module; AFAIK no-
one's tried this before with a dogtail script: it seems to work quite
well - I wonder what the main dogtail developers think of this approach?

Seems to work, with a couple of caveats:
(i) looking at a hexdump of the output file, it has content 'bar\x0a',
so I've checked for that in the tests
(ii) looking at the log (which I've attached) on running the tests, I
get some spurious print output:
** (process:6105): WARNING **: Failed to send buffer
This looks like a bug in dogtail to me.

Hope this is useful; another step closer to getting automated tests into
the gnome tinderbox...

Dave
[david shirehorse2 gedit]$ ./gedit-saving-tests.py
Warning: Dogtail could not import the Python bindings for libwnck.  Window-manager manipulation will not be available.
Bonobo accessibility support initialized
GTK Accessibility Module initialized
looking for type: got text/plain
looking for type: got text/plain
click on {"Open Location..." menuitem}
Setting text of {child with roleName='text'} to 'file:///home/david/coding/dogtail-tests/gedit/test1.txt'
click on {"Open" button}
Setting text of {child with roleName='text'} to 'bar'
click on {"Save" menuitem}
click on {"Quit" menuitem}
.Bonobo accessibility support initialized
GTK Accessibility Module initialized
looking for type: got text/plain
looking for type: got text/plain
click on {"Open Location..." menuitem}
Setting text of {child with roleName='text'} to 'file:///home/david/coding/dogtail-tests/gedit/test3.txt'
click on {"Open" button}
Setting text of {child with roleName='text'} to 'bar'
click on {"Save" menuitem}
click on {"Quit" menuitem}
.
----------------------------------------------------------------------
Ran 2 tests in 9.109s

OK

** (process:6105): WARNING **: Failed to send buffer

** (process:6105): WARNING **: Failed to send buffer

** (process:6105): WARNING **: Failed to send buffer


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]