[Sugar-devel] Automated testing
Manuel Kaufmann
humitos at gmail.com
Sat Dec 8 10:34:38 EST 2012
On Fri, Dec 7, 2012 at 8:48 PM, Daniel Narvaez <dwnarvaez at gmail.com> wrote:
> Link to the test case (tree.py is an helper that I'm trying to integrated in
> toolkit)
Good! This is really useful. I was playing with it yesterday and I found it fun!
Another utility that I found useful is this one:
https://live.gnome.org/Accerciser
It allows us to explore the full structure of our Gtk application that
are running. So, we can explore our Activities to look for the
specific widget. Then use "find_child" / "find_children" with the name
and role_name to find them.
I wrote a simple (and awful) test using these utilities to check that
the frame is shown and it works. It uses ImageMagick to call the
"compare" command.
The idea:
- preset a language
- preset a XO color
- look for the widget
- run event on them (click, motion, etc)
- wait some secs so those events take effect
- take a screenshot
- crop it (check only the proper section)
- compare that screenshot with another already taken manually by us
Known issues:
- we need to hide the mouse cursor
- sensible to different resolutions
- < others >
Maybe you can find something interesting here. Good luck with this :P
Cheers,
--
Kaufmann Manuel
-- http://mkaufmann.com.ar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_frame.py
Type: application/octet-stream
Size: 2157 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20121208/391ba100/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: my_screenshot.png.bak
Type: application/octet-stream
Size: 12830 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20121208/391ba100/attachment-0001.obj>
More information about the Sugar-devel
mailing list