Testing Metacity

I am aiming to build a set of unit and regression tests for Metacity for 2.24. The idea is to run Metacity in a sandbox X server (Xnest at first, and Xvfb when things have settled down) and run a test on it in a simple harness. This would be run automatically after every checkin, or every night, or both.

The usual way to do this would be using something like dogtail, but that’s not an option because Metacity’s menu and buttons are not accessible. (Should they be? That’s another question, but one I’d like an answer to.)

Perhaps the answer is to have a special window property called _METACITY_TEST or something which holds a ton of test information unless it’s compiled out (which it would be by default). We’d still need to find a way to simulate clicking certain buttons or whatever, unless maybe we could query the dimensions of a button and fake up a click message somehow.

I have a bunch of ideas about how to do this, but if anyone would like to hand me some clues, now’s a great time…

Published by

Thomas Thurman

Mostly themes, triaging, and patch review.

3 thoughts on “Testing Metacity”

  1. There is X11::GUITest perl module at CPAN which works great for clicking buttons.

    No problem using it in Xvfb as well.

  2. Metacity should be accessible for you (it works here)– the only ‘trick’ is that you need to know to press Alt+Space (changeable in metacity keyboard prefs) to activate the window menu. Once posted, Orca reads the contents of the menu just fine, and keynav within the menu works as expected.

    Since the window menu does everything that the window buttons do and more, and all the window buttons have keyboard shortcuts too, the buttons themselves probably don’t really need to be individually accessible. (At least, nobody has ever complained that they need to be, AFAIK.)

  3. I once saw a way to control a cursor remotely through for an X session. Maybe that would be helpful. Send messages to move the mouse to the correct position and send a click message?

Comments are closed.

Leave a Reply

Your email address will not be published. Required fields are marked *