December 22, 2015

Automate Amazon: Development Environment Setup

This post is first in a series of nine.

Back in June 2015, I blogged about how I would write automated tests vs Dave Haeffner's site, "The-Internet".

For this second project, I picked a more difficult site to automate: Puchasing an order on's site.

Please note: I haven't been doing automation on-the-job for very long. I have less than a year's worth of experience developing automated tests in Selenium WebDriver. Please don't take anything that I am doing as the industry standard.

If you do have knowledge of the industry standard of automated testing, please feel free to correct me! I will be eagerly monitoring the comments section for any advice or wisdom.

Setting Up the Development Environment

For this project I am using:
  • Platform and Operating System: Windows 10.
  • Integrated Development Environment (IDE): IntelliJ. Although we use the Enterprise Edition at work, the only difference between that and the free Community version is extra features for database integration.  
  • Test Framework: TestNG. It is built into the latest version of IntelliJ, but you still need to set up the dependencies in your pom.xml file.
  • Dependencies Management: Even though at work we use Gradle, for this project I am using Maven to add Selenium WebDriver and TestNG as dependencies. 
  • Browsers: Both at work and at home to inspect page elements, I use the Firefox browser plugins Firebug and Firepath to examine the web document.

If you need help getting IntelliJ, setting up Maven, setting up your pom.xml file or TestNG, or installing Firefox, Firebug or Firepath, there is a free introduction on Alan Richardson's page, Start Using Selenium WebDriver at

If you are looking for more material, Alan Richardson has an extensive course on Selenium 2 WebDriver with Java at which helped me immensely preparing for my current position.

Make sure to go to the official SeleniumHQ site at or visit their new documentation that is still in progress at

If it helps, below is a sample of my POM.xml file.

<?xml version="1.0" encoding="UTF-8"?><project xmlns=""         xmlns:xsi=""         xsi:schemaLocation="">



Run Your First Test

Let's name the test class

The @BeforeClass method contains the setUp information that launches the browser.
The @AfterClass method contains the tearDown information that closes the browser.

They will be executed respectively before the class PurchaseOrderTest, then after the class is done.

When you run PurchaseOrderTest:

  • The Firefox browser opens up
  • It navigates to
  • The Firefox browser closes.

Now that we know that tests can be run, with the next installment of this blog, we can sketch out a quick test.

-T.J. Maher
 Sr. QA Engineer, Fitbit
 Boston, MA

// Automated tester for [ 8 ] month and counting!

Please note: 'Adventures in Automation' is a personal blog about automated testing. It is not an official blog of

1 comment:

Anonymous said...

Thanks, Experience with various technologies and businesses this is generally helpful.
Still, I followed step-by-step your method in this selenium training
selenium certification
selenium online training Hyderabad
selenium online courses