Wednesday, August 13, 2008

Strongwind Basics


ABSTRACT: New introductory Strongwind tutorial called Strongwind Basics.


A big portion of our work on the Mono UI Automation team involves making Mono WinForms applications accessible through AT-SPI. Gtk+ applications are already accessible through AT-SPI, thanks to a bridge that connects AT-SPI and Atk. Screen readers like Orca, and other accessibility tools can then use AT-SPI to access GUI controls (widgets). This allows the accessibility tool to get information from a widget and even perform actions--like clicking a button. Because widgets are made available this way, working with accessibility lends itself extremely well to automated testing.

Several GUI application automation frameworks use AT-SPI to access widgets. For example, LDTP, Dogtail, and Strongwind all access widgets through AT-SPI. On our team, we're using Strongwind to ensure that we're doing a good job of making MonoWinforms applications accessible.

Strongwind is pretty small, simple, and it has some neat logging features. The Strongwind code is located on the GNOME SVN servers and they are the "strongwind" product on GNOME's Bugzilla. The IRC channel is #strongwind on irc.gimp.org.

One small downside is that Strongwind is relatively new; there aren't many users and not much documentation or tutorials. I decided that writing an introductory tutorial would (hopefully) be a good reference for current and future teammates. Hopefully it will be useful to others, too! It's called Strongwind Basics, and I've been writing way too many wikis lately.

On a related note, I made a couple of diagrams for the wikis and for the UTOSC coming up later this month. One diagram is specifically for Strongwind and the other shows how we implemented a harness to run several Strongwind tests on several machines and log the results. Feedback is appreciated, but this is my first real attempt with Inkscape, so don't bust my chops too much :)

pssst, we still have job openings

Friday, July 11, 2008

Building Accerciser from Source (on openSUSE)

I have been using Accerciser for a few months now to aid in my Mono accessibility work, but until now I had been using it in openSUSE 10.3. With the release of openSUSE 11, I had to rebuild it from source. Of course, that meant figuring out all the dependencies again. Since this will happen every time we get a new openSUSE release to test on, I decided to make of note of things this time to reference in the future.

All I did was created a tiny shell script that uses zypper to install the packages that I needed to have in order for Accerciser to configure and compile correctly. Of course, this is openSUSE specific, but it probably useful for other distros (in that you might be able to determine which packages you possibly need):
#!/bin/sh

# accerciser_prep.sh

zypper in gconf2-devel orbit2-devel indent libidl-devel popt-devel glib2-devel pcre-devel libstdc++-devel glib-devel libstdc++43 glibc-devel glib linux-kernel-headers automake autoconf m4 intltool gettext-tools cvs libgomp43 gnome-common gnome-doc-utils-devel libxml-devel ncurses-devel readline-devel tack gcc gcc43 libmudflap43 make zlib-devel IPython
Then just grab Accerciser ( svn co svn+ssh://[login@]svn.gnome.org/svn/accerciser/trunk accerciser ) and run configure, make, and make install! Note that these are the packages that are needed after a default install of openSUSE 11 on my test machines; Accerciser has other requirements, many of which were installed on the OS by default.

By the way, Accerciser 1.34 was released semi-recently (June 16). Accerciser is an interactive Python accessibility explorer for the GNOME desktop. It uses AT-SPI to inspect and control widgets, allowing you to check if an application is providing correct information to assistive technologies and automated test frameworks. I recommend it for anyone involved with accessibility, but also anyone who develops or tests applications! For a good introduction on accessibility and to see how Accerciser can be used, check out Steven Lee's article entitled "Python Powered Accessibility." The article was published recently in Python Magazine;

Friday, June 27, 2008

VMWare (Workstation 6) on openSUSE 11

EDIT July 13th 2008: Thanks to Tony Barnard who pointed me to Cameron Seader's blog entry that has a fix for the vmware-vmblock module problem described in this blog entry.

---

ABSTRACT: ignore the inaccurate gcc version warning and run 'runme.pl' in the vmware-any-any-update117.tar.gz

I ran into a few kinks while installing VMWare on my new openSUSE 11 install. They are fairly minor, but here's some info that should get you up and running.

First of all, the vmware-config.pl script told me that it couldn't find a suitable vmmon module for my kernel. No problem, that's normal, the script will just compile one for me like always correct? Well, correct for the most part; after affirming that I wanted the script to try and build the vmmodule, I got the following message:

Your kernel was built with "gcc" version "4.3.1", while you are trying to use
"/usr/bin/gcc" version "4.3". This configuration is not recommended and VMware
Workstation may crash if you'll continue. Please try to use exactly same
compiler as one used for building your kernel. Do you want to go with compiler
"/usr/bin/gcc" version "4.3" anyway? [no]
I found this message a little odd and unsettling since I had just installed the system and hadn't messed with updates yet. I decided to investigate whether the script was even telling me the truth or not.
bean@cobweb:~> gcc --version
gcc (SUSE Linux) 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036]
The version looked right to me and I wondered where vmware-config.pl was getting its information. After browsing the gcc manual, I found the -dumpversion option and tried it out...

bean@cobweb:~> gcc -dumpversion
4.3
This appeared to be the problem. Sure enough, line 3266 of vmware-config.pl runs gcc with the -dumpversion option. So this really wasn't anything to be worried about, while it is apparently a gcc bug, it's safe to just respond "yes" to the prompt.

I didn't get very far after that, however. The vmmon module fails to build almost immediately. Coincidentally, a weak or so earlier I had been installing VMware on a Slackware machine and had learned about the vmware-any-any-update patches. These are unsupported and apparently third-party updates for vmware. The newest update I found was vmware-any-any-update117.tar.gz. I download it and ran the 'runme.pl' script, which updates the source of the modules.

So after ignoring the inaccurate gcc version warning and running the vmware-any-any-update117.tar.gz, I now have a running (and unsupported :)) VMware setup.

As a side note I didn't find that some of the vmware-any-any-update files claimed to be 117, but were really no different than the 115 versions. I'm not sure what's up with that, but it threw me off for a while. I uploaded the good one I found. Also, the vmblock module still fails to build, it would be nice to find a fix for this.




Thursday, April 10, 2008

Cute 'lil laptop

I just noticed the new HP 2133 Mini-Note PC is available on on HP's site. It looks pretty neat. Basically it's a mini-laptop with a 8.9-inch diagonal WXGA (1280 x 800 resolution) screen and a "92% full-size" keyboard. Additionally, it has an external VGA port that supports resolutions up to 2048 x 1536 at 75 Hz. The thing weighs 2.8 lbs. It has a VIA C7-M processor (1.0, 1.2, or 1.6 Ghz options). The coolest part is that is ships with Windows Vista (boo!) or SUSE Linux Enterprise Desktop (SLED) 10 installed (yay!). Ordering it with SLED10 will save you $50. Here's a picture:



Oh, and they won't ship the 1.0 Ghz version with Vista. I wonder why? [ 1 | 2 ]

Pretty cool device at a reasonable price; just for fun, I configured a 1.2 Ghz model with SLED10 and 2GB of RAM for $618. Pricing starts at $499. Here are the detailed specs.

I don't know if it's as cool as Sony's VAIO UX, but it sure is a lot cheaper and probably quite a bit more practical for most people.

Wednesday, April 9, 2008

Building accerciser from source

EDIT July 22nd 2008: This post is outdated. See http://bgmerrell.blogspot.com/2008/07/buildling-accerciser-from-source-on.html.

---

To get Accerciser working with all default plugins, do the following:

Manually download pygtksourceview src from sourceforge and build it.

Install all requirements from Accerciser page plus:

Additionally, make sure the following are installed:
  • autoconf
  • intltool
  • automake
  • gtksourceview185 (version 2 won't work here)
  • gnome-doc
  • gnome-common
  • get all the associated devel packages just to be sure
  • and maybe some others...

Monday, April 7, 2008

Mono UIAutomation Team: Getting Specific

I have been spending most of my time until now getting to know more about Accerciser and AT-SPI (see this previous post for more information on those). As a byproduct of studying and working with the Accerciser code, I have also been able to work quite a bit more familiar with GTK+, which has been nice.

Sandy, Knocte, and Mike Gorse have all been pumping out some code for the project the last few weeks. We also interviewed a candidate for the team last week. At the end of the week, I recognized that I better get a clear vision of our project and goals so I could assess the work that would need to be done from a QA perspective and perhaps start working on some relevant tools, patches, or scripts.

In addition to what I had learned from the Python Powered Accessibility article (I recommend reading it before you go on if you haven't already done so), this is what I knew about the project:


Granted, this might mean a lot for someone who had worked with accessibility in Linux before, but it didn't mean a whole lot to me. Not enough to have a clear vision, anyway. I wanted to get a really clear picture, so first I turned to Wikipedia and the MSDN documentation to get some fundamental knowledge and came up with the following definitions:

Managed Code - executes under the management of Microsoft's CLR virtual machine in the .NET framework, or another similar virtual machine.

CLR - common language runtime, virtual machine component of Microsoft's .NET initiative. The CLR runs a form of bytecode called CIL (common intermediate language).

CIL - previously known as MSIL. Stack-based object-oriented assembly language executed by a virtual machine (e.g., CLR)

Unmanaged Code - executed directly by the computer's CPU. The programming language used to create the program determines whether it will run as managed code or not. C and C++ are examples of unmanaged code.

CLI - Microsoft's open specification describes the executable code and runtime environment that form the core of a number of runtimes including the Microsoft's .NET framework, Mono, and Portable.NET

Microsoft UI Automation - a managed code application programming interface (API), exposing user interface controls for test automation and assistive technology. Part of the .NET framework starting at 3.0. Successor of MSAA (Microsoft Active Accessibility)

UIA Clients - applications such as screen readers and testing frameworks written in managed code (e.g., C#/VB).

UIA Providers - UI implementations or application controls such as checkboxes. Written in managed code or C/C++ (unmanaged code).

Olive - set of add-on libraries for the Mono core that bring some new .NET APIs to Mono.

UIA Core - the UIA core masks any differences in the frameworks that underlie various pieces of the UI. For example, the content property of a WPF button, the caption property of a Win32 button, and ALT property of an HTML image are mapped to a single property.

AT - assistive technology. A generic term that includes assistive, adaptive, and rehabilitative devices and the process used in selecting, locating, and using them.

AT-SPI - a toolkit neutral way of providing accessibility facilities in applications. AT-SPI can also be used toa tuomated testing of user interfaces. AT-SPI is currently supported by GTK+2, JAVA/Swing, Mozilla, and StarOffice/OpenOffice. AT-SPI will act as the equivalent of the UIA core.

ATK - accessibility tookit. Developer toolkit that allows programmers to use common GNOME accessibility features in their applications.

ATK<->UIA Bridge - mapping of ATK to the UIA provider APIs.

A lot of these definitions weren't new to me, but it's nice having them all in one place. They didn't exactly answer my questions, but they provided me with enough background to ask some (at least somewhat) intelligent questions, so I took my inquisition to Sandy on IRC:

bgmerrell: from msdn "The UI Automation core masks any differences in the frameworks that underlie various pieces of UI. For example, the Content property of a WPF button, the Caption property of a Win32 button, and the ALT property of an HTML image are all mapped to a single property"
bgmerrell: so i assume we're going to have to do this masking for gtk widgets too, right?
sandy: basically, that's the idea with us implementing providers
sandy: has Calvin shown you his drawing of the client and provider sides?
bgmerrell: this thing? http://www.mono-project.com/files/3/37/Architecture.png
sandy: yeah!
sandy: so here's the deal
sandy: on the provider side, we are using the interfaces defined in UIA to map Winforms and Moonlight to UIA, and then we're mapping UIA to ATK
sandy: then on the client side, we're going to map the UIA client interfaces directly to at-spi
sandy: so we don't do anything with gtk
sandy: because the stack is already implemented there
sandy: gtk apps will show up over at-spi
sandy: and our client-side bridge will let us see them via the UIA client interfaces
sandy: UIA has their "core"
sandy: but we already have the equivalent of that
sandy: it's at-spi
bgmerrell: okay that makes sense. so, at-spi is currently supported by "GTK+ 2, Java/Swing, the Mozilla suite, and StarOffice/OpenOffice.org, and some QT support"
bgmerrell: so theoretically we will be able to control/access any of those to some degree?
sandy: that's right
bgmerrell: sandy: do you have any ideas on what we should do from a QA perspective to test the provider piece? Or do you think we're mostly going to be testing the provider via the client?
sandy: I think testing via accerciser and orca makes the most sense
sandy: for QA purposes
bgmerrell: okay, maybe i'm confused. on the provider side you don't really have an accessible UI because that's implemented on the client side isn't it?
bgmerrell: but you guys are talking about working with Accerciser, so accerciser must see something that's accessible
sandy: yes
sandy: so on the provider side
sandy: we are making winforms apps visible over at-spi
sandy: so existing ATs like Accerciser will be able to see our apps and interact with them
sandy: so I think the end-goal of this year is to make is so you can use existing Linux ATs to access winforms apps
sandy: if I understand correctly
sandy: so then I guess the best QA approach would be to test how well we achieve that goal
sandy: perhaps by writing accerciser or dogtail or whatever scripts that test interaction with winforms apps?
bgmerrell: "so existing ATs like Accerciser will be able to see our apps"
bgmerrell: how does that contrast to what we'll be doing on the client side?
sandy: so once we start working on the client side...
sandy: the goal is that we can write new ATs
sandy: or port new ATs from Windows
sandy: written using the UIA client interfaces
bgmerrell: instead of directly using at-spi?
sandy: then those ATs will be able to see all of the Linux apps that are exposed over at-spi, including gtk, winforms, qt, oo.o, mozilla, etc
sandy: bgmerrell: exactly

So now when I looked at the architecture image, things made a lot more sense.

Blue and green items are existing implementations, beige shows items that our team will implement, and I hope to work on a managed AT next year.

This information made things more things a lot more clear for me, and hopefully will help others that are new to the project and/or accessibility. If there is something that is unclear, please let me know; I would like this to be clear enough that anyone interested in working on the project can have a good fundamental understanding of what we're doing.


Saturday, April 5, 2008

Broadband in the U.S.A.

Below is a video clip of Walter Mossberg, the principal technology columnist for the Wall Street Journal. He talks about the present state (i.e., crappy state) of broadband in the U.S. I think he make some really good points.



One example of overpriced DSL with ridiculous service (and security) is from the rural Utah city from which I moved in 2006, behold:

DSL Pricing

$39/month: up 1.5 M
$49/month: up to 3 M
$59/month: up to 6 M

It surprised me to see that their lowest DSL plan wasn't 256k anymore! I'm sure there are some even better examples out there, I just have dealt with this one personally.

My current situation isn't really any better, the ISP is the city in which I live. I pay $28 ($35 if I didn't get cable TV from them) and I get about 1mbps-3mbps. They don't even advertise their bandwidth. This is frustrating because 15 miles north of here and 10 miles south of here, both cities have Utopia, which offers 100 mbps upload and download for a reasonable price (someone remind me how it costs).

Mossberg makes a good point. We need to be putting as much emphasis on our broadband infrastructure as we are on our roads and freeways. If the U.S. is to keep up technologically with other high-tech countries (think economic repercussions if we don't), we need to be investing in broadband that helps us stay competitive in the global economy.

For all of the iPhone fans out there, toward the end of the video Mossberg also foretells the availability of the 3g iPhone in 60 days.