Archive for Internet
Using Cucumber, Webrat and Selenium to test ajax form field validations
September 4th, 2009 • 2 comments Cucumber, Internet, JavaScript, Merb, Ruby, Webrat, programming
I have an app that fires an ajax request on a form field to validate its contents when I take focus off the field.
I am also using Cucumber, Webrat and Selenium for my integration tests.
I needed my integration tests to test the Ajax responses and the tests weren’t receiving a response from the Ajax requests.
The Problem
I found that by simply completing the web form, the ajax request was not being fired and my test was therefore failing when i checked for the existance of the Ajax response. It soon became clear that selenium doesn’t really interact with the form in the sense of selecting fields and entering values; It simply enters values. As such, the Ajax request was not firing and my test was failing.
The Solution
The solution is Selenium’s fireEvent method, which you can pass a form field id and the blur method:
selenium_session.fireEvent(”field”, “blur”);
In Webrat, this is ever simpler:
fire_event(”field”,”blur”)
On using this in a Cucumber step, the ajax is fired as the blur command tells the browser to take focus off the field.
Lovely!
Awesome tools for rapid UX prototypes – Letting you focus on the solution!
June 18th, 2009 • 3 comments Internet, agile, gtd, portal, programming, software development
Comic Life is great for creating story flows in a rough and ready way, with a little style.
Balsamiq is an excellent tool for rapidly creating purposefully low-fi wireframe mockups
Napkee enables you to import Balsamiq mockups and turn them into HTML prototypes! Lovely!
Axure is excellent for rapidly creating interactive prototypes.
Liferay Portal is a pretty awesome portlet container that, with a bit of UX (HTML, CSS and JSP) hacking, enables you to rapidly produce fully functional portals. It comes with a vast array of portlets out of the box, saving you a whole load of time.
JQueryUI is a lovely toolkit for quickly developing interactive prototypes. I’m not completely convinced by it as a production tool (heavy JS? but i could be wrong), but excellent for prototyping
iPhone 3.0 Beta 4 Bluetooth tethering results: Less than 1/3 the speed of USB
April 29th, 2009 • 1 comment Apple, Internet, iPhone
So, it’s rather slower – 96kbps.
To test it, i tried the ThinkBroadband speed tester, (that i successfully used to test USB tethering), but it failed to complete the test.
I then tried the Broadband speed tester site and got the above results, as well as a 74kbps upload speed.
When (if!) i find time, i’ll go digging and find out if there’s an obvious reason for this – it’s clearly shouldn’t be bottlenecked by the performance of BlueTooth, as it should run up to 3 Mbit/s (http://en.wikipedia.org/wiki/Bluetooth)
iPhone 3.0 Beta 4 + iTunes 8.2 Pre-release = USB Tethering Active Again :)
April 29th, 2009 • Apple, Internet, iPhone
Yep, USB tethering died in Betas 2 and 3, but with iTunes 8.2 Pre-release and Beta 4, all is working again and it feels wonderfully fast. Well, it’s only running at 336.58 Kbps, but it feels great! As a note, i think the fix was actually iTunes rather than iPhone Beta 4.
Lovely
Now to test the Bluetooth speeds
Important iPhone Push Notification consideration
April 16th, 2009 • Apple, Business, Internet, Objective C, iPhone, programming, software development
Tags: linkedin
A point worth noting by all iPhone developers considering the exciting opportunities of cloud-side iPhone app notifications – how much will it cost you to provide this service?
An important point to consider.