Skip to main content


Showing posts from September, 2011

biggest concern with moving your applications to the cloud?

wow I wrote about enterprise cloud adoption and found this poll on my linkedin profile that validates my thinking of security and reliability being biggest concerns for cloud adoption by enterpries.

Enterprise customers and Cloud Adoption

A big fear among enterprise customers who want to adopt cloud is that
Is my data secure?What if this site goes down for 3-4 hours?What if this startup shutdown business, what will happen to my data? Recent downtimes from big companies as shown below instills a fear among mission critical busineses wanting to adopt cloud.
Microsoft App Engine While moving to cloud makes sense economically but having one bad day can make people go back to traditional methods of manging own infrastructure. Think of a hospital storing all records in cloud, it cant afford a 2-3 hour downtime. There is a better solution to this and its by adopting the hybrid model and companies that will do it s…

Making Junit tests faster

I had some batch of Junit tests that were taking close to 20 minutes and it was wasteful to wait everytime before checking in code, one trick I found was to use the forkmod="once" property. Using this reduce the time to 5 minute 8 sec.

        <junit tempdir="build" printsummary="on" fork="yes" forkmode="once" haltonfailure="${test.haltonfailure}" failureproperty="tests.failed" showoutput="false">

Earlier Junit was forking a JVM per test and now its doing one for all test so its very fast. Here is some documentation from Junit on this property.

Controls how many Java Virtual Machines get created if you want to fork some tests. Possible values are "perTest" (the default), "perBatch" and "once". "once" creates only a single Java VM for all tests while "perTest" creates a new VM for each TestCase class. "perBatch" creat…

Selenium and ExtJS

A trick to test selenium with ExtJS is to use cssSelectors. As an element can have more than one css classes and you really dont need to define any style for that css class it can be a good locator for the element and faster than XPATH on IE.

You can define cssSelector as

        tbar: {
            xtype: 'toolbar',
            items: [
                    xtype: 'button',
                    text: 'Send',
                    cls: 'x-btn-text',
                    overCls: 'x-btn-noicon',
                    ctCls: 't-btn-yellow x-btn-over',
                    iconCls: 't-send seleniumSendNote',
and you can then in your test call the button click as


Selenium and ExtJS HtmlEditor

I had to add a selenium test for a page with ExtJS HtmlEditor and selenium wont recognize it, even tests recorded with Selenium IDE wont recognize it. The reason is that HtmlEditor uses a hidden textarea and a DIV on top of it to trap keystrokes. I tried using lots of ways to set text into it but it would complain about component not visible  and other stuff. Finally the only way I could do is to execute Javascript from webdriver. Here is the code that I used to set the text. String notes = "This is a test note from selenium"; JavascriptExecutor js = (JavascriptExecutor) driver; js.executeScript("Ext.getCmp('notes').setValue('" + notes + "')");