- Screencast Demo: http://www.screencast.
com/t/Nr9vXXvCz - App: https://github.com/
RallyCommunity/RallyGithub
Thursday, May 17, 2012
Rally Github Integration
Monday, April 23, 2012
Thursday, April 5, 2012
This is a cross post from: Rally Engineering Blog
Sometimes I run across a task where I need to attach event listeners to many different dom elements of the same type. I am usually tempted to do something similar to the code below.
Ext.each(Ext.query('a', parentNode), function(el) {
el.on('click', doSomethingAwesome);
});
This is ExtJs's way to loop through each dom element matching the passed css selector and attach an event listener to it. I'm lazy and it's less code than the correct implementation, which would be to add a listener to the parent element and filter for the correct target element inside the handler function. The disadvantages to the lazy method are that multiple listeners are created, all of which have some amount of overhead attached, and that listeners need to be removed and/or reattached whenever the innerHTML of the parent element changes.
An ExtJs specific example of when the 'lazy' method doesn't work is when event listeners need to be attached to elements created by a renderer inside of a GridPanel cell. The GridPanel does not expose any row or cell render events, so there is no reliable way to add event listeners to dom elements located inside cells.
Fortunately ExtJs's Element.on method has a helpful 'delegate' option that does all of this for you automatically. Use ExtJs's Element.on method to attach a listener to the parent dom element and specify a css selector for the 'delegate' option to filter out events whose target node does not match the passed css selector.
var parentEl = Ext.fly(parentNode);
parentEl.on('click', function(event, target, options) {
console.log('the "target" argument is the anchor element that is a child of parentNode');
}, this, {
delegate: 'a'
});
Saturday, December 10, 2011
AmFast 0.5.3 Released
Wednesday, November 23, 2011
Saturday, October 8, 2011
Testing With Browser Mob
I recently got the chance to work on a project using BrowserMob for automated testing. BrowserMob allows you to run Selenium test scripts "in the cloud". In my case I was not testing functionality, but instead testing performance of a Flex app. I needed to test latency and throughput of messages being dispatched through the Flex messaging system via http://code.google.com/p/amfast/. This proved very difficult to test locally, but was a snap with BrowserMob.
The Testing
I created a simple Flex client to send and receive Flex messages in a way that replicated a production environment. I also created a custom server component to replicate the production environment and to help log message data to be analyzed later. After getting the client and server running locally, I signed up for a BrowserMob account and launched several browsers with their web interface.
The whole process was simpler than it should have been, and I was very impressed with how well it worked. I highly recommend trying out but BrowserMob for performance and load testing applications, and I'm hoping to get a chance to try out running more full featured automated functional tests in the future.
