Skip to main content


Showing posts from April, 2016

How to handle duplicate element locators?

Have you come across use cases when you have create multiple element locators for almost similar element locators? Consider following text box, which gets date filled when user clicks on - expired, today, end of week etc links - This is how page html looks - And the element locators for expired, today etc link could be - "#coupon_expiryAt~a:nth-of-type(1)" "#coupon_expiryAt~a:nth-of-type(2)" There are other possible element locators but each link requires its own element locator. Now considering earlier example, the only difference in element locator is index number 1, 2 etc So what if we could get rid of creating different element locators and pass index number depending on the link we want to interact with? Let’s create base element locator - private static LinkElement getExpiryLinkElement( int index) {    return new LinkElement( "Expired Link" ,           By. cssSelector (String. format ( "#coupon_

Should you be using Distributed Testing for Performance Testing ?

Having posted elaborately on how to carry out JMeter distributed and using Jmeter Backend listener to plot live graph of running test. I have been disappointed with entire approach. And my disappointment is not limited to just JMeter as any other performance testing tool would suffer from similar factors. Distributed test itself results in lower throughput than what you can achieve from test running from independent machine. This is described on (unfortunately web site is down for quite some time). I am pasting the reasoning here - If you want to use your local machine to control the test you have to navigate the joyous process of getting RMI to work over multiple subnets and firewalls to allow your local machine to control multiple remote (EC2) slaves – you can do this by tunnelling RMI communication and patching JMeter, it’s messy though. To workaround this issue you have to use a remote Master as well as remote Slaves. Even then