Archive for April 2007

Selenium for your web application testing

Selenium looks cool. Sure, its slower than unit tests, but its much faster than a human. It uses the web browser itself, to get your tests going, and will test it just like how a human tests. In a continious build farm, you can have good browser compatibility testing (run it against IE on Windows, even), and it also does functional testing.

It’s not only for Ruby, it works with Perl, Python, PHP and so forth. Its good for regression testing, and uses JavaScript. This means its very cross-platform, and cross-browser compatible.

How does it work with Flash? The new version of Flash apparently has JavaScript support according to Alex Chaffee, and you can actually use Selenium if need be. A member of the audience did mention that he had tried it, and its a little icky.

When testing web apps, getting titles are important, to see what the title of the page says – do it frequently in testing, because sometimes with web apps, you don’t get a 404 error, but a 200 OK (even though the page itself says it has failed). Write your tests early. Selenium can become slow – consider refactoring, or maybe move it to unit testing. It also has a slow mode, and it might be useful for a demo of your application even (well, you can see the login, and so forth). Polling architecture, web apps will time out – a somewhat sensible timeout is about 20 seconds, even if you’re on a very slow connection – any longer, and you’re probably not generating the page and its a (timing) failure.

Selenium doesn’t work well with testing file downloads. And on Firefox, you might need to use the Chrome extension. Cookies stay on between tests, so this can leads to tests passing when run alone, but failing when run together – solution is to eval JavaScript to clear cookies between tests. In Firefox, you can specify the name of a profile and launch it in a clean browser – Selenium by default, makes a new profile by itself – this really helps as some Extensions might affect your tests. On Linux, this is firefox -ProfileManager.

Peer To Patent, a community patent review site (and it will be open source!). Its tested with Selenium, sponsored by the USPTO, and looks like something that can definitely be useful in making sure silly patents aren’t passed (when the patent officer doesn’t know there’s prior art). When asked at the SDForum Ruby on Rails gathering, how many held patents, I’d say about 15-20% of the crowd raised their hands! Impressive number, but then again, I’m sitting in the Silicon Valley, what did I expect, right?

Continious testing architecture? Mac Mini, Parallels (Ubuntu, Windows), they use coherence mode of Parallels and IE sits and looks like a “native” application. All tests run, and the Ubuntu virtual instance is what launches everything. Testing thus happens on everything – OS X, Linux and Windows.

Technorati Tags: , , , ,

Distributed environment quirks; arrived at the MySQL Conf

I arrived earlier in the afternoon (on my second Friday now), and was waiting in the shuttle, for apparently another colleague. Twiddling thumbs, getting bored, and just when half an hour passes by, I think of the advice Stewart gave me, saying that the shuttle service was a little dodgy. Suddenly, I see a “familiar” face – its Lenz Grimmer, my colleague that I’ve been working with for ages. I say familiar, because all I’ve seen are photos, and made contact regularly via conference calls, IRC, and email. We met face to face, for the first time, just today.

Amazing, working in a distributed environment, no?

All that aside, Jay, Lenz and I couldn’t resist catching up by the poolside. Dinner ensued at Nicolino’s Italian restaurant in Sunnyvale, located a sweet walking distance from the Hyatt. No side-paths for walking, which I find to be surprising (you can cross streets with pedestrian crossing buttons, but parts of the streets just lose a sidewalk!)

Trying to sleep, and get some rest now for an early morning, but the 1,500 kids that are staying at the Hyatt are ruining my efforts. Knocking on doors, ringing my phone, screaming, running about, and apparently I have a view of the pool, and both the hot tub and pool are swarming with kids. Our future leaders are having a good time, it seems.

Thunderbird 2.0 is out!

Knowing Fedora (Core 6), I won’t see Thunderbird 2.0 anytime soon, so I decided to get it via upstream. Some initial comments.

No x86_64?
Thunderbird only says Linux i686. In fact, its a 32-bit binary, as opposed to what Fedora provides in 64-bit form.
file thunderbird-bin
thunderbird-bin: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, stripped
file /usr/lib64/thunderbird-1.5.0.10/thunderbird-bin
/usr/lib64/thunderbird-1.5.0.10/thunderbird-bin: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped

Running it
Just copy it to /usr/lib/thunderbird, and it currently runs via /usr/lib/thunderbird/thunderbird. /usr/bin/thunderbird clearly needs to be edited to allow for using Thunderbird 2.0. A good way to get it going:
mv /usr/bin/thunderbird /usr/bin/thunderbird-1.5
ln -s /usr/lib/thunderbird/thunderbird /usr/bin/thunderbird

Extensions
Some of them that I use, don’t work. QuickQuote (to select part of a message, and hit reply, and only that gets quoted, ala Evolution), Remove Duplicate Messages, Sync On Arrival (important when using IMAP). I am confident that we’ll see them very soon.

New stuff
The new visual interface is very slick. It looks rather professional, and I am thrilled by it.

New mail notification that pops up, looks a little like AVG scanning your email on Windows, but it actually shows useful information, and will be a productivity boost. I notice that it also doesn’t only appear in the workspace Thunderbird is running in, but in the current active workspace. This may become a nuisance when in the zone for work, and you’re getting mail every 10 minutes.

Compacting folders? I can select an option to do it automatically from now on. Yet another dialog that won’t bug me on occassion.

When Thunderbird detects new messages in the folder, it normally dispalys such a folder differently. On mouse overs now work wonders, as it shows summaries of what the new messages are.

Google Support
Gmail support within the accounts field, means I’ll actually be reading my GMail accounts a lot more. Its interesting to have Google integration built right in, because getting the Google Calendar syncing to Thunderbird 2 is also not a problem.

Gmail support is such that your mail gets POP-ed down by default, but its also kept on the server. You sort of get the best of both worlds. What obviously doesn’t work, is label support – you tend to get a lot of messages in your Inbox. Then comes the problem of also archiving your messages offline. Its not streamlined, say like IMAP, which is something Google should really consider enabling.

In conclusion…
I’ll play with this a lot more, as I use Thunderbird on Linux and OS X for daily use. I prefer the regular theme now, over the CrossOver theme on the Mac. I dearly miss Sync on Arrival. And I just got annoyed by the new message notification pop-up, as it came up while I was typing this entry! (You can disable it in Preferences, if need be.)

Technorati Tags: , , , , , ,

Bob Sutor speaks in KL

If you’re in Kuala Lumpur and are a little bored this Friday evening, why not pay a visit to the MyOSS Meetup, in where a very special guest, Bob Sutor, will be speaking about ODF, open source, and so forth, with a very interesting topic: The Shift to ‘Open’: Boost or Brakes for Innovation and Business.

There will also be a panel discussion afterwards, to see what the community can do to enhance its presence, livelihood, etc. It remains to be seen who will be on said panel, but it’ll be some of the more vocal folk. So keep 7-10pm free, on Friday night. After which, I’m sure folk will head off to booze, or have food. Either way, hanging out with the more prominent FOSS crowd, is fun.

Kudos to Interunix, for giving away free Ubuntu CDs.

Technorati Tags: , , ,

Dell Inspiron 640m Linux support getting “a little” better

Today I upgraded my kernel, so am running 2.6.20-1.2944.fc6 and am pleased to announce that on the Dell Inspiron 640m, brightness control works. Well, sort of. I can reduce brightness and increase brightness, but increasing brightness (Fn+ UpArrow) while in X, still causes X to crash. All that’s recorded is:

Apr 18 11:54:23 hermione kernel: atkbd.c: Unknown key pressed (translated set 2, code 0x8b on isa0060/serio0).
Apr 18 11:54:23 hermione kernel: atkbd.c: Use 'setkeycodes e00b <keycode>' to make it known.

As long as video.ko is loaded, I can hit Fn+F8 quite successfully, and get video out working now. Its in mirror mode as opposed to a stretched desktop, but I’m somewhat thankful as GNOMEs panel is still retarded when it comes to shrinking down (watch it go apeshit on you). However, repeated attempts (say, 8th time pressing the Fn+F8 key combo and it cycles between displaying on the onboard LCD, mirroring, just the external LCD, and so on) will cause the entire display driver to crash. Nothing will then be viewable, so a reboot is in lieu.

The sound control via hardware buttons still do not work (they used to back in the 2.6.18 days, afaik). Both the hardware and the Fn-key combos don’t work.

So I decided I need to be a good open source citizen, and report some bugs. #236866, #236867. I also updated the Fedora on the Dell Inspiron 640m wiki page.

For what it is worth, Desktop Effects has decided to stop working (to amuse myself I tried to enable it today). Its now nice to note that I can give presentations using my Linux box again, and things will be working (quite unlike my last experience) . I’m also excited to note that Ubuntu Feisty Fawn is coming out tomorrow, and at the same time annoyed that I’ll be travelling and don’t want to futz with my main work machine. Rob Weir will be glad to note that its only taken 2 years for me to start seeing the light.

Technorati Tags: , , , , , , , , , , ,

Palm embraces Linux – a trip down memory lane

It is great to see that Palm is now embracing Linux. I however think that embracing Linux to be relevant again seems like a rather daft idea.

Palm made great products. As someone that had a PDA when it was cool to own one (early 1998, Palm III), I have to say that counting the taps you needed to make to get to an application was what was significant then. Usability was a key focus. Grafitti was something that required learning, but once the hang of it was gotten, it was easy. The idea that you could beam contacts, memos, calendar entries and even software, was simply fabulous. In the early days, I’ll admit to even using the occasional “payware” for free, thanks to this wonderful beaming technology.

I matured after a while, and realized that carrying a cell phone, wallet, keys, coins, and a PDA just didn’t make so much sense. This must have been the stage when I moved from cargo pants, to Dockers Mobile Pants, to just regular pants, when you don’t have all the fancy pockets. I had several Palm PDAs, even a Handera 330, then most recently the Tungsten C.

What worked? Its simplicity. What didn’t work? The ridiculous cost of shareware. A cost you never recouped when upgrading, or even stopped using the piece of software. Horrendous syncing technology, even on the Microsoft Windows platform (double contacts, deleted memos, and the like would happen from time to time).

Over the years, the expandability was good. The Handera meant I had CF and a SD slot, the Tungsten C gave me WiFi, and in the future, it looks like Palm will be releasing an OS that has Linux underneath it.

Will they go all the way into making it into a product that users actually want to use? Or are they hoping that developers fill in the gaps, ala what Nokia is doing with the Maemo platform and the N770/N800. Will people start expecting that because the base is Linux, all software on the Palm will have to be free? Remember though, the operating system under it never mattered – it was always the usability and ease of use.

Technorati Tags: , , , , , ,


i