30 December 2008

Speech / Talking Results for RSpactor

After discovering that autospec was taking up a lot of CPU while it was "idle", I looked for alternatives. I found RSpactor, which doesn't take as much CPU, and is better since it's a dedicated window with nice GUI results and so. My only gripe was that I'd gotten used to the spoken results output I'd rigged up for Autospec.

I really prefer the spoken results because it is not visually distracting, and doesn't require me to be paying attention to the area of the screen where they pop up (I use a 30" monitor, plus the 17" laptop monitor, so I'm not always looking at the right spot for the Growl notices, and I don't like the monitor-wide growls). Lucky for me, RSpactor is open source and is up on GitHub.

I thought it was an Objective-C Cocoa app, but as it turns out it's a RubyCocoa app. I'd built RubyCocoa apps before, so was familiar with that, plus of course know Ruby. It wouldn't have mattered either way (I'm fine working in ObjC as well), but this did make things a slight bit faster.

Anyway, did a quick bit of work and got a new preferences panel for Speech added, and then rigged that up to test results, so that I now have my desired spoken results. A slight improvement comes along in that it (optionally) speaks the number of passing/failing/pending tests - just insert a question mark in the string/phrase you want spoken for each and it'll say the number at that spot.

I've sent a pull request to RubyPhunk, but no guarantees it will get added to the main line. In the mean time, if you're interested, grab it from my RSpactor fork on GitHub. Update: RubyPhunk integrated my changes into the main RSpactor code.

29 December 2008

DealRank™, Similar and Nearby Hotels and Deals, and "Interesting" Deals

Over the last couple weeks, we've built some cool new features on DealBase.com. Three in particular...

Interesting Deals Pages

This is fairly simple, but one of my favorites. There is a list of these pages on the home page in the right hand column, under "Interesting Deals". You can find the cheapest deals, the best deals at 5 star hotels, and so on. But, my favorite to check out is the Most Expensive Deals page. This is where we list the most expensive hotel packages, and you can get a glimpse of what the uber-rich might plunk down for. Deals currently as as much as $110,000/night, yes per night. But go take a look and check out what those deals include. Things like private jet for transportation, $40,000 in jewelry, and so on. Oh, how about it includes a trip to Russia, and you know, to make it extra cute, a "Presidential Puppy"! Crazy.

This page is just a lot of fun to explore and see what some of the hotel's come up with.


DealRank™ is our new way of ranking deals to show you the best value. This is an algorithmic/mathematical determination based on various criteria for deals. It factors in the nightly rate, percentage savings, and various other aspects. We expect this to be one of the best ways to sort deals and help you evaluate what is truly a great deal. Each person looking at hotels has different reasons and criteria for evaluating deals. Some want the absolutely best price, some want the best overall value, some are looking to get the biggest savings, or the most extras thrown in, and so on. DealRank™ should help provide a more holistic view on this. We've done a lot of testing and tweaking here, and will continue to do so as the site evolves, but I am pretty darn happy with the results so far. We still have many other ways to sort deals (see the sort menu in the upper right of any deal listing page), but this is our new default.

Check this out on say the New York City hotel deals page, where previously the most economical deals didn't always rise to the top (percentage savings wise, NYC tends to have the best deals at more expensive hotels).

Similar and Nearby Hotels and Deals

Another quite useful feature is the list of similar and nearby hotels or deals (depends on the what kind of page you're on) listing at the bottom of some pages. This factors in various criteria, but one thing for sure is that all of the listed hotels/deals are always within a 50 mile radius. I personally used this when looking for deals on a trip I took the other weekend.

An example is similar and nearby hotels on, one of my favorites, the W hotel in Seattle. Amazon put me up in this hotel. If you've never stayed at a W, they're pretty cool. While working for Adobe for many years, I stayed at the Fairmont Seattle a ton, and you'll see that listed as the second hotel in the list of nearby hotels. But, the W is more edgy, they tend to have cool bars, upscale, swank rooms, etc. Seattle is a favorite place of mine to travel to.

I'm working on a particularly cool feature right now, that I can't wait to get out there. Will take a bit longer as we want to get the UI right and make it of utmost use, but I think it will be something of great value to everyone. Stay tuned.

11 December 2008

Browser Testing Services (BrowserCam, CrossBrowserTesting, etc.) - What I Really Want

When testing web apps for a general/wide-ranging audience, one must test across a slew of different browsers and operating systems (and different versions of each). This is a real pain, even if you have an army of testers at hand (which most of us don't). I employ various tools to help me with this (CrossBrowserTesting.com, BrowserCam, VM Ware with different VM setups, etc.). But, the reality is that I don't feel like these really stack up to what I need. More specifically, BrowserCam, and its competitors do not. CrossBrowserTesting is actually pretty awesome and does what it advertises quite nicely, it's a favorite tool right now.

What I'm after is a way to see what a survey of pages on my site look like on different browsers and OS's. This is by no means a definitive test of a site, but more of a quick visual inspection of appearance, without having to fire up a dozen different pages across maybe 30 different browsers/OS configurations. We use an automated test suite to test the bulk of other things, but appearance can't be tested that way.

BrowserCam helps, but honestly I find it quite lacking as a tool in this arena. Note, I'm picking on BrowserCam, as that's the one I use, but the others (BrowserShots, Litmus, etc.) all seem to suffer some or all of these problems, and further, they don't seem to have projects or ways to establish a standard suite of tests. Getting on with it, all of this really boils down to two primary things:

  • Ability to edit the settings on a project's images. As far as I can tell, once you select the URL's, image size, browsers, etc. for a project, there is no way to change any of that! What if I just want to change the window size? Can't, I have to create a new project (or add new images to the existing one, replicating all my previous work. This seems like an obvious hole.

  • Automation. I want to be able to automate regeneration of the project. I'd like something like a simple URL/HTTP API to do this, so that I can, from a command line, use curl or similar to issue a single HTTP request that will regenerate a project's images. Thus, the API would need to use HTTP authentication or similar, and specify which project to regenerate. With this, I would be able to automate requesting a regeneration of the project as part of/after deploying my application.

I'm currently looking into creating my own script to drive the automation, but it's looking non-trivial due to the way BrowserCam's pages work: everything winds up on the same URL, actions/links are all JavaScript that post forms, with a lot of params and a bunch of params that will take some time to ascertain if a) they're required, and b) all the info in the parameter is needed, etc. If someone's already done this, let me know! Also, suggestions for tools to drive the automation? I've used the Ruby Mechanize library in the past for things like this, and this may work if I can determine the params, etc., and if Mechanize can even drive the JavaScript links (not sure it can - anyone?). I can't use something like Selenium or Windmill because this needs to work from a script/command line, and not rely on a browser.

Finally, if anyone knows of a service similar to BrowserCam that solves these, even if it supports a few less browsers, do let me know. At very minimum it would need to handle Internet Explorer and Firefox, preferably also Safari, and cover Windows XP, Vista, MacOS X 10.5, and one popular Linux flavor. Nice to haves would include Opera and various others.

02 December 2008

GitHub Post-Receive Hook for Pivotal Tracker

Over the holiday, I whipped up a quick GitHub Post-Receive Hook for use with Pivotal Tracker. This is just a small web service, implemented in Sinatra. It was my first time using Sinatra, so any suggestions on improvements are of course welcome (as are they in general, this is open source). I've put the code up on GitHub in the somewhat painfully named tracker_github_hook repo.

The service supports multiple GitHub repos and Tracker projects, so you can run a single service that integrates multiple projects. The service will figure out which commits go to which projects based on a config file on the server that associates a GitHub repo URL (make sure to use the http version of the URL, not https), to a Tracker project ID. For example:

github_url: http://github.com/chris/tracker_github_hook
tracker_api_token: a1234b56789c0defa12b3c4def56a78b
tracker_project_id: 123

You will need to take care of running the service within your particular server setup. I'm personally running it via Thin/Rack, behind Nginx. I have it setup on the same server that runs our continuous integration system, so these two are differentiated by subdomain.

It should be noted, I will not claim this thing is secure. You run it at your own risk, etc.

Aside from getting the service running on your own server, you'll need to add the URL to it as a GitHub post-receive hook for each project you want to integrate. To do that, go to the Admin tab of your GitHub repo, and then the Services tab. At the top you'll see where you put the URL in. The URL is just the root of the service. Also see GitHub's docs on post-receive hooks as it illustrates just how I built this, how to set it up, etc.

Hopefully others find this useful. Or, what I really hope is that the Pivotal guys get with the GitHub guys and add a standard integration service, where it's automatically configured on the Tracker side, and you just need to turn it on on the GitHub side much like the other service integrations.