Filed under Apache JMeter, Performance Testing.

With Load Focus you can run your own Apache JMeter test scripts (.jmx files).

All you need to do to run a performance test (to check web app or website rendering, REST / SOAP APIs behavior, or any other endpoint) is:

  • create a new Apache JMeter test after you login in the performance service
  • add an injector machine and select the type of injector machine you want to use (i.e. t1.micro) and location (i.e. North America)
  • upload the Apache JMeter test file into Load Focus
  • duplicate the injector machine or add new injector machines (you can upload different jmeter script files on different machines)
  • start the test and check the results
  • compare results with older test runs

More details about how to create a JMeter Performance Test script can be found in this blog post.

Start using Load Focus now and see how cost effective and reliable is the performance tool.

Add your email below for other QA tutorials.

Filed under CQ Testing, Performance Testing, Selenium WebDriver, Test Automation, UI Testing.

If you are using Adobe CQ for your web application, and you’d like to have an automated framework and automated tests to run the nightly, here is what we can offer:

1. Continuous integration infrastructure using Jenkins CI and custom created test framework

  • CI Jenkins/Hudson job created for all the below test types
  • CI Jenkins/Hudson job reporting for all the below test types

2. Integration test infrastructure based on JUnit or TestNG for different functionalities desired to be tested

  • test grouping based on feature
  • test grouping based on test types -smoke, release etc
  • framework for running integration tests
  • 10 demo tests + plus additional tests on demand

3. UI Testing using:

  • Selenium Webdriver & Thucydides
  • Webdriver tests
  • Javascript UI framework on demand
  • UI test framework
  • cross browser testing
  • mobile automation testing
  • 10 demo tests + plus additional tests on demand

4. Server side performance testing using:

  • JMeter scripts
  • Java and Sling performance framework
  • performance tests integrated with Jenkins for running nightly
  • 10 demo tests + plus additional tests on demand

5. Client performance testing:

  • page load time measurements using PhantomJS
  • page load time measurements using Webdriver
  • 10 demo tests + plus additional tests on demand

6. CQ server side test infrastructure for your application

7. BDD tests based on JBehave or Cucumber

8. Sling health check integration

Entire infrastructure implementation time: 1 – 2 months.

Subscribe here for free audit: click here

Filed under Apache JMeter, Performance Testing, Selenium WebDriver, UI Testing, Web Testing Books.

If buy books only once a month and if you are in search for good web testing code examples, solutions to real QA problems and tools to make your daily work easier, please think of us next time.

We will be here with our new book. Fell free to buy it when is going to be available or just subscribe to our newsletter for other nice Free QA Tutorials.

We are going to release soon the: “Web and Mobile Application Testing Automation – Hands on guide” book. The web testing book will contain a lot of useful QA and DEVELOPER materials and hands on demos for:

  • Software Testing Fundamentals
  • Continuous Integration Systems
  • Testing Types: Unit testing, Integration Testing, Security Testing, System Testing, UI, Performance, Load, Stress Testing, Localization Testing etc
  • BDD – Behavior Driven Development and Agile Testing
  • UI Testing (fundamentals, Selenium WebDriver, Selenium IDE)
  • Automation Frameworks
  • Load and Performance Testing (terms, tools and services to use)
  • Page Load Testing (page rendering)
  • Mobile Testing and Debugging Applications
  • Web Developer Tools
  • Build New Testing Automation Framework from Scratch (End to End example)
  • Top QA Questions Explained

This book is for:

  • Quality Assurance Engineers from Novice to Professional interested in learning QA terms, real testing examples, automation example explained and best practices
  • Software Developers and FrontEnd Developers interested in understanding Automation Frameworks and end to end testing implementations
  • Product Owners to have a better understanding of how web to create Acceptance Tests and what is possible to achieve with an automation framework
  • Entrepreneurs focused on delivering quality applications

Add your email in the below or right forms and we’ll let keep in touch with all the updates and release date.

A nice discount if you subscribe before we release 🙂

Filed under Selenium WebDriver, UI Testing.

Load Focus is a Cloud Load Testing Service. You can stress your app/website/API with thousands of concurrent users from all over the world.

In order to write UI tests with Selenium WebDriver you need to be able to identify web page elements fast and in an accurate way. You don’t want to revisit these selectors very often so you must choose the right selector from the beginning.

There are some browser tools that you can use in order to identify web elements in the DOM easier. These are:

  • Firebug for Firefox
  • Google Developer Tools for Chrome
  • Web Inspector for Safari

You can also create automated website tests for free with

Selenium WebDriver API supports different possibilities to identify elements: by ID, by CLASS, by NAME, by CSS selector, by XPath, by TAG name. Also you define your custom selector in order to interact with the elements.

It’s always a good practice to assign unique IDs to elements, also names and classes in order to be more usable for automatic UI tests. If that is not possible you’ll need to use advanced or XPath selector to interact with those elements. The most popular selectors are the CSS selectors due to performance and simplicity reasons.

To inspect an element you just have to open the desired web page, right-click the desired element and click on Inspect Element. A new panel will open showing the desired element. Also you can inspect other elements by clicking on the cursor in the top left side of the Developer Tools or Firebug panels and hovering page elements.

Locating Elements with Selenium WebDriver, findElement() method returns and WebElement and findElements() returns a list of WebElements.

1. By ID:

 in Java: driver.findElement("element id")) 

2. By CLASS:

 in Java: driver.findElement(By.className("element class"))

3. By NAME:

in Java: driver.findElement("element name"))


 in Java: driver.findElement(By.tagName("element html tag name"))

5. By CSS Selector:

 in Java: driver.findElement(By.cssSelector("css selector"))

6. By Link:

 in Java: driver.findElement("link text"))

7. By XPath:

 in Java: driver.findElement(By.xpath("xpath expression"))

Let’s get a HTML snippet code and see how can we use these Selenium WebDriver selectors in order to identify the desired elements:

<div class="thumbnail center well well-small text-center">


   Subscribe to our weekly Newsletter and stay tuned.

<form action="" method="post" name="subscribe"><label for="name">Name: </label>
      <input class="name" id="name" type="text" placeholder="Enter name..." />
      <label for="email">Email: </label> <input class="email" id="email" type="text" placeholder="" />
      <input class="btn btn-large" type="submit" value="Subscribe" />

   <a title="first link" href="#link1">First Link</a>
   <a title="second link" href="#link2">Second Link</a>

Let’s get some WebElements from the above HTML code snippet:

 WebElement nameInputField = driver.findElement("name"));


 WebElement nameInputField = driver.findElement(By.className("name")); 


 WebElement emailInputField = driver.findElement("email")); 

Locate link elements with findElements() method from the HTML snipped

public void findLinksTest(){
//Get all the links displayed
List links = driver.findElements(By.tagName("a"));
assertEquals(2, links.size());
for(WebElement link : links)

Locate link elements from the HTML snipped:

How to find a link with Selenium WebDriver API by full text:

WebElement firstLink = driver.findElement(By.linkText("First Link"));
assertEquals("#link1", firstLink.getAttribute("href"))

How to find a link with Selenium WebDriver API by partial text:

WebElement firstLink = driver.findElement(By.partialLinkText("First"));
assertEquals("#link1", firstLink.getAttribute("href"))

Locate elements by HTML Tag Name:

WebElement subscribeButton = driver.findElement(By.tagName("button"));

Locate elements by CSS Selectors

WebElement emailInputField =
driver.findElement(By.cssSelector("form input#email"));


WebElement emailInputField =


WebElement emailInputField =

Performing partial match on attribute values

^= as in input[id^='email'] means Starting with.


$= as in input[id$='_name'] means Ending with.


*= as in Input[id*='userName'] means Containing.

Finding elements with XPATH

Enroll Now for the new Online Course: How to Find XPath for Web Elements in Chrome and Firefox Browsers.

  • Absolute path
WebElement userName =
  • Relative path
WebElement email = driver.findElement(By.xpath("//input"));

Finding elements using index

WebElement email =

Finding elements using attributes values with XPath

WebElement logo =




Starting with:



Ending with:




Locating table rows and cells

public void testTable() {
	WebElement simpleTable = driver.findElement("items"));

	//Get all rows
	List rows = simpleTable.findElements(By.tagName("tr"));
	assertEquals(3, rows.size());

	//Print data from each row
	for (WebElement row : rows) {
		List cols = row.findElements(By.tagName("td"));
		for (WebElement col : cols) {
			System.out.print(col.getText() + "\t");

Using jQuery selectors

Locate all the Checkbox which are checked by calling jQuery find() method.
find() method returns elements in array

List elements =
(List) js.executeScript("return jQuery.find(':checked')");

Get the text of an element with no class or id, and dynamic rendering inside the DOM:

For example:

  <img src="/image1.png" /> Text1

This is the method to return the text of an WebElement based on the parent element:

public String getCity(){
        WebElement element = driver.findElement(By.xpath("//img[contains(@src,'/image1.png')]/parent::*"));
        return element.getText();

Related Posts

Check out how to take a screenshot with Selenium WebDriver or to pass traffic though a proxy.

Check also The Ultimate Selenium WebDriver Testing & Hands-on Guide – Online Course.

Filed under Load Testing, Performance Testing.

If you want to check the performance improvement or degradation of your web application between two builds you need to do the following:

  • decide what part of your application you want to compare – page rendering, API response time, CPU or memory of the two builds
  • create a Apache JMeter performance test script
  • run the load/ performance test against the first version of your application
  • monitor the system under test and save the test results
  • deploy the new build on the same environment (same hardware and network connection)
  • run the same test and compare results

You should be careful that the performance test in run under the same system.
You can also use the compare functionality that Load Focus (Cloud Load and Performance Service) offers. Load Focus saves all your tests configuration and test results.

You can very easily select two test runs and compare them on the same chart. You can compare the Response Times, Latency, Throughput, Bytes/second, and other metrics. Sign Up and give it a try, I’ll make your life easier and no test results will be lost any more.

Filed under Apache JMeter, Load Testing, Performance Testing, Uncategorized.

If you want to stress your application with Apache JMeter you will try to start a load/performance test from JMeter with a lot of threads or concurrent users.

You have an example in our previous post how to create a simple GET performance test for a web application or web site.

Let’s return to our question, the number of threads that you can start from your machine it first depends on its hardware capabilities CPU, Memory. Apache JMeter is a Java application with a good UI interface, very easy to design new tests, however if you want to run load or performance tests you should run the JMeter test (.jmx file) from the Command Line. This way you will be able to start a lot more concurrent threads.

As an average you can start between 200-250 threads on a single machine, with a maximum of 300 threads. Before starting the actual test, you need to do a dry run from the injector machine and inspect when the tests start failing and limit the maximum number of threads per thread group.

To run a load or performance test with your own Apache JMeter script you can use Load Focus Cloud Load and Performance testing service which allows you to do the following:

  • select the number and location of injector machines (for example North America, Asia, Europe etc)
  • upload your own JMeter test script (.jmx) on the injector machines
  • run the test and monitor the execution log and live results

You can also upload different scripts on different machines so that you can check different scenarios like check your Sign Up functionality while the site is under heavy load.

Filed under Amazon Web Services, Apache JMeter, Cloud Services, Load Testing.

LoadFocus launches today the cloud load and performance testing service powerful enough to stress a web application or API with thousands of concurrent users.

Based on Apache JMeter open source project and hosted in the cloud, LoadFocus is designed for software developers, QA (Quality Assurance) engineers and product owners to run accurate load and performance tests with minimum costs.

load testing results

As we can see nowadays there are numerous web applications and APIs that appear everyday which requires load and performance assessments.

However, the existing commercial and professional load testing solutions are too expensive and too complex to meet real world requirements. The open-source load testing tools, like JMeter, are limited in terms of scalability for the requirements of enterprise and high-traffic web applications.

Once you sign up with, the only cost you will have is running the injector machines (Amazon EC2 instances).
The cost depends on the type of machine you’re using and the duration of the load test. provides unlimited testing capacity, interactive real-time reporting and comprehensive result analysis integrated with mobile devices.

Click here to try it now!