Monthly Archives: March 2009

GUI Test Automation with Ranorex Studio

Today I got a demo of a tool called Ranorex Studio, a test automation product built using the SharpDevelop IDE. Aside from the IDE, I last played with in the early days of the SharpDevelop project, the most interesting aspect was the Ranorex C# framework with that provides the basis of modeling UI elements in a manner similar to Zombie’s GEM framework. Tests can be written in C#, VB.NET or Iron Python using the framework to build tests. To give you a taste of this kind of “model” binding here is fragment from a typed class that models Windows Calc:

/// <summary>
/// The FormCalculatorAppFolder folder.
/// </summary>
public class FormCalculatorAppFolder : RepoGenBaseFolder
{
    /// <summary>
    /// Creates a new FormCalculator  folder.
    /// </summary>
    public FormCalculatorAppFolder(RepoGenBaseFolder appFolder) :
            base("FormCalculator", "/form[@title='Calculator' or @title='Rechner']", appFolder, 3000, true)
    {
    }
    /// <summary>
    /// The ButtonAsterisk item.
    /// </summary>
    public virtual Ranorex.Button ButtonAsterisk
    {
        get
        {
            return CreateAdapterForPath<Ranorex.Button>("ButtonAsterisk", "button[@text='*']", 5000, null);
        }
    }
    /// <summary>
    /// The Button3 item.
    /// </summary>
    public virtual Ranorex.Button Button3
    {
        get
        {
            return CreateAdapterForPath<Ranorex.Button>("Button3", "button[@text='3']", 5000, null);
        }
    }
    /// <summary>
    /// The ButtonEqual item.
    /// </summary>
    public virtual Ranorex.Button ButtonEqual
    {
        get
        {
            return CreateAdapterForPath<Ranorex.Button>("ButtonEqual", "button[@text='=']", 5000, null);
        }
    }
    /// <summary>
    /// The OutputText item.
    /// </summary>
    public virtual Ranorex.Text OutputText
    {
        get
        {
            return CreateAdapterForPath<Ranorex.Text>("OutputText", "text[@controlid='403']", 5000, null);
        }
    }
    /// <summary>
    /// The ButtonClose item.
    /// </summary>
    public virtual Ranorex.Button ButtonClose
    {
        get
        {
            return CreateAdapterForPath<Ranorex.Button>("ButtonClose", "titlebar/button[@accessiblename='Close' or @accessiblename='Schließen']", 5000, null);
        }
    }
    /// <summary>
    /// The Button7 item.
    /// </summary>
    public virtual Ranorex.Button Button7
    {
        get
        {
            return CreateAdapterForPath<Ranorex.Button>("Button7", "button[@text='7']", 5000, null);
        }
    }
    /// <summary>
    /// The ButtonMinus item.
    /// </summary>
    public virtual Ranorex.Button ButtonMinus
    {
        get
        {
            return CreateAdapterForPath<Ranorex.Button>("ButtonMinus", "button[@text='-']", 5000, null);
        }
    }
    /// <summary>
    /// The Self item.
    /// </summary>
    public virtual Ranorex.Form Self
    {
        get
        {
            return CreateAdapterForPath<Ranorex.Form>("Self", "", 3000, null);
        }
    }
}

Notice in this example methods of class FormCalculatorAppFolder use XPATH regular expressions to “bind” their respective UI element which I think this is an interesting approach with a lot of flexibility. Also notice the idea here is similar to that of strongly typed dataset for data access. The tool provides a set of “adapters” which are used to drive various types of UI at varying degrees of accessibility (WinAPI, .NET, Web, MSAA).

I haven’t had enough time using the tool or framework to draw a conclusion as to the validity of the approach or quality of implementation but I have seen a few unexpected error dialogs which are things that will need to be fixed right away.

Are you familiar with or have you used this tool? If so, what do you think?

If not, what tools are you using for GUI automation?

Getting my attention

I’ve written 500+ blog posts and not until I developed a Starter Kit did I start getting so much direct email though the Contact me link on my blog. Of course, not all of it ends up reading like this (comment), far from it, rather let me give you an example:

i 2 m working on facebook app
i try install ur starter kit but it not appear
need u 2 send me solution urgent
i didn’t understand plz help

This kind of writing drives nuts. Perhaps if my kids were teens I might appreciate this a bit more but they’re 5, 3 and 1. While this isn’t an actual email it is representative and as you can imagine, not exactly the kind of thing I look forward to reading. I used to feel obligated to respond to nearly everyone who felt the desire to reach out to me via the Contact me link but seriously? I don’t know, and don’t really want to know, if there is a name for this “style” but I find it difficult and halting to read. How it makes sense to reach out to someone with a message like this asking for help? Yeah, this ain’t it.

Granted, in some cases it may simply be a language barrier but I’ve gotten plenty of messages written in this “style” where it’s pretty clear that’s not the case.

Comcast Triple Play Denied

Last Thursday I called ComCast regarding an issue with our Internet access and subsequently ended up asking about their Triple Play plan combining TV, Internet and Phone service. The rep gladly quoted me $99 for 12 months which I accepted and scheduled a tech for today (Saturday) between 12-4pm. The rep mentioned he’d call me back within 20 minutes to confirm a smaller time window but that call never happened but I thought “no big deal”. Well, I decided double check this morning that, in fact, someone was coming today and found ComCast had no record of my call nor any order for new service. The new rep apologized and offered to schedule a new appointment and set me up for $115/month! Rather puzzled, I explained my previous call and basically all i got was an apology. He went on to inform me the $99 price expired last November and he wasn’t authorized to give me that “deal” to which I said, “no thanks”.

Suffice it to say, not a good experience. Perhaps it’s called Triple Play because it’s just that, over quickly.

Facebook’s Disappearing Application Platform

W

ith each refinement to the Facebook UI it seems their application platform is taking a back seat to the desire of chasing after millisecond status updates a la Twitter and with this latest round applications seem to have all but disappeared. When the platform first rolled out there was a period of rapid developer adoption largely due to the potential audience size an application could field in a short period of time, that viral affect that was so popularized. The excitement continued for quite some time though I think in some cases Facebook must have become envious as it seems others were perhaps having more commercial success on their platform than Facebook itself if not in real terms perhaps in relative terms.

In the beginning, applications played a prominent roll and “installing” new applications was perhaps all too easy. I’d refer to those as the “wild west” days with the ensuing gold rush period that was eventually killed off. Ever since then it seems Facebook as increasing clamped down user’s exposure to third party applications and in many cases made it difficult and costly to keep an FB application up and running successfully over time as the API continues to be a moving target.

With the latest round of UI changes I couldn’t find a link to Facebook’s own Developer’s application, which I have “installed” on my account allowing me to review the FB applications I’ve created. Eventually, I found a round-about path through the Settings|Application Settings menu though that seems quite counter intuitive. Clearly, the rules of engagement for applications have changed dramatically over the platform’s brief lifetime so much so I’d be interested in statistics regarding how the viral nature of Facebook applications has been altered since the early days though I suspect we’ll never know. I think if you were fortunate enough to get in early and earn a respectable size audience you’re probably doing just though I’d suspect that’s not nearly as repeatable as one might hope given the current situation.

Facebook has something unique with their platform and garnered a developer audience quickly though it seems bent on following in Apple’s footsteps by locking it down so tightly they’ll end up thwarting the majority of developer’s who’d write applications they wouldn’t have the time nor wherewithal to write. These days it’s almost looking like Facebook would have preferred $g(Facebook Connect) rather than their platform route as that’s certainly the direction their pushing. At this point, let’s just say I’m glad I’m not working for a company in the midst of developing a Facebook application hoping to reach my target audience.

Reading list since November 2008

image image
image image

Following up my last post I thought I’d add my reading list from roughly November of last year. I’m currently finishing up Obama’s Audacity of Hope while at the same time reading Robinson Crusoe on my iPod Touch using the Classics App, a must buy IMO at $2.99. I wasn’t sure how I’d like reading a book on a device but it’s been an enjoyable experience and a great escape when eating dinner while on the road like I am right now writing from Sierra Vista, AZ.

I’ve been thinking I should put together a similar list of the books our kids are enjoying from our local library. We usually pick up 10-15 books every few weeks for reading before bed and there have been some clear favorites.

10 pages a day

A few weeks ago I had a wide ranging and varied conversation with Mark Dahlby, a principle of writers.com, and Jeff Meyer an old friend from my Borland Tech Support days, where we discussed writing, music and Tuvan throat singing among numerous other topics. During the conversation I mentioned one of the main reason’s I blog is the habit of regular writing outside the context status updates, instant messages and email none of which I view as “writing”. We discussed the immediacy of content on the web and that much of our communication is breaking down to twitteresque snippets and how our consumption of content isn’t much deeper as skimming now rules the day. In fact, I’ve trimmed my blog reading dramatically and I’m no longer keeping up with the river of posts as evidenced by my Google Reader Trends which isn’t a bad thing.

Google Trends

Back to Basics

At the beginning of the year, not that I’m a subscriber to resolutions, I decided I’d gotten too far away from reading books and started a ten-page-a-day commitment. Each day I work to set aside time for at least ten pages from whatever book I’m reading and so far it’s working. In fact, I’ve been working on a reading list post but I’ve been too darn busy and have slowed down on blogging. Ah, the trade offs!

Do you have any reading goals or find this to be a problem too?

Down another 2,000 points on the DOW

image
Chart from bloomberg.com

I last commented on the economy back in October and things are far worse now. The predictable job market loses are being reported daily, a pattern which I believe we’re likely to see for quite awhile. The next shoe to drop might well be the failure of some of our major financial institutions or the very large and distressed companies such as GM. It’s becoming increasingly unclear to me why throwing billions of dollars at these companies, like AIG in particular, is the right thing to do as they appear to be bottomless sink holes. Like BofA’s predicament with Merrill Lynch where it appears they completely misunderstood the severity of the problems Merrill faced. It’s striking how Ken Lewis, BofA’s CEO, was on 60 minutes in late October touted as having created one of America’s “healthiest banks” yet eight weeks later was asking for billions from tax payers in bail-out.

I find it hard to believe the government can continue writing checks without letting at least some of these large institutions fail. Now that we’re into near constant bail-outs it seems actually allowing even one to fail would likely send another shockwave to the economy yet it seems almost inevitable.

I’ve been traveling a lot lately for work and it’s interesting to see businesses that are doing well during these economic times. For example, I was recently in West Virginia training at the American Public University whose stock has held up quite well all things considered. And today, listening to Fareed Zakaria’s GPS podcast from March 1st with Canadian Prime Minister Stephen Harper about how Canada hasn’t had a single bank failure nor bail-out. In January I was in Toronto at the CPP Investment Board and asked about the impact of the economy on their business though they too are doing quite well. We also discussed how Canada’s banking regulations may have helped it avoid the crisis the US finds itself in as they haven’t suffered a sub-prime mortgage meltdown.

As for our personal investments I continue to be extremely concerned about our 401k/IRA’s as we’re over 50% loss meaning many years worth of savings is gone. We’re fortunate that we purchased our home in 1999 meaning we have valuable equity although that’s declining too. Home sales in our neighborhood used to be commonplace though houses now rarely come on the market and when they do they sit there for months.

Lastly is crime which at least anecdotally seems could be on the rise. In the past few months two friends of ours have had their cars broken into here in Scotts Valley, the first such cases I can recall in the 10 years we’ve lived here. I suspect this too will be a sad reality as time marches on and the number of displaced and desperate people increases. Speaking of which over the weekend we were at Costco in Santa Cruz and the crowd surrounding the nearby homeless shelter was many times the largest crowd I’d seen there before.

[Update: March 10, 2009] A third friend’s car was broken into this time in Aptos.

I haven’t reached the depths of despair of the like so aptly described in Robinson Crusoe, which I’m presently reading, but the economic outlook isn’t good.

Finally, as I learned from my son I’ll close with a few good notes: we just hired a new employee at Falafel this week and I head out on Sunday for yet another business trip, the third such trip this year. So here’s to good business!

[Update: March 19, 2009] A car in at neighboring house was broken into last night and my wife spoke with the police who said that our neighborhood had been targeted several times recently. Apparently, they caught two parolee’s from nearby town in relation to theft.