Showing posts with label intermediate. Show all posts
Showing posts with label intermediate. Show all posts

April 19, 2016

Why Use a Builder Pattern? Examples of Telescoping Constructors when storing Address data

Let's say you wanted to fill out the Billing Address of a form that has the following fields:
  • Name
  • Street Address 1 
  • Street Address 2
  • City
  • State
  • ZipCode
  • Country

If you wanted to store this information into an Address object, the class could look like:

Address.java:
     

public class Address {

  private String name;
  private String streetAddress1;
  private String streetAddress2;
  private String city;
  private String state;
  private String zipCode;
  private String country;
  
}

How would we set these fields?

March 6, 2016

Let's compare notes on how we write an automated test framework!

Good day! I was wondering if I could bother you for a bit. I was working on two projects, one for creating an automated testing framework for an eCommerce site, and one for testing a REST API endpoint:



... I coded them as I would at my workplace.

I'd like to recruit other automated developers in the software industry to possibly take a look at it and give me their feedback.

Let's compare and contrast what we do in their own workplace.

Maybe we could compare notes?

Thank you very much for your time!

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

 // Software tester since August 1996
 // Automation developer for [ 1 ] year and counting!

March 2, 2016

Automation Development Experience: Level Up!

[ T.J. Maher has reached Automation Development Experience: Level 1]

* ding! *

I can't believe I have now been an automated developer for a whole year!

I've had some experience executing before my current position executing other people's automation scripts. I've done lot of coursework with Alan Richardson's Selenium 2 with WebDriver. There is no substitute, though, for on-the-job experience, especially at the breakneck pace we are working at.

When I started off at my job, the Sr. Automation Engineer gave myself and another QA resource three weeks of private instruction for the next on how Selenium WebDriver / Java was used. Within just seven months I went from writing automated tests to writing an automated test framework. And just last month, I started writing API tests.

I owe a lot of my success in automation to this blog. I asked permission early on to blog about the automation code I am writing. As long as I just focus on the automation, it's fine. To deepen my understanding of what I am doing, I've been able to come up with little side projects, posting my code in my portfolio at GitHub.  So far, I've done:


Are you an experienced automation developer? I was wondering if you could take the time to look at a few of the projects I have been working on and review the code? I'm still at the stage where because I don't have experience backing me up, I am just making it up as I go along. If you have the time, I would love to get your advise!

... Want to keep updated with what I am working on?

  Subscribe to the Blog: 

I am looking forward to the next twelve months. Who knows what fun projects I will encounter? All I know is that when it comes to writing automation, I am having the time of my life! 

Happy Testing! 

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

// Automated tester for [ 1 ] year and counting!

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

February 28, 2016

RESTful Testing with Stripe: From JSON to Object using GSON

This post is fifth in a series of six. Need to go back to the beginning?

With RESTful Testing with Stripe: Using UriBuilder, HttpGet and other Apache HttpComponents, we focused on laying groundwork for communicating with the Stripe API endpoint, sending messages and retrieving data.
  • JSON response was retrieved
  • JSON was converted it into a JSON string
  • Google's GSON library was used to place it in a data object we created.
... But how exactly did this process happen?

Let's simplify things and set all the charge object data to null in our JSON file.

February 25, 2016

RESTful Testing with Stripe: Using UriBuilder, HttpGet and other Apache HttpComponents

This post is fourth in a series of six. Need to go back to the beginning?

Now that we built a skeleton framework to test using the Stripe REST API, storing and retrieving the API Key, we can perform actions. We are going to:
  • Create a method called getListOfCharges in our StripeUtils class, where we can pass in how many charges we wish to retrieve. 
  • Create a data object to hold all the information we retrieve.
  • Add functionality that turns the JSON object we get back, and add all information into the data object we created, using Google's GSON library.

What Our Framework Will Look Like

By the end of this blog post, our automation framework will look like:

February 8, 2016

Testing Beyond the UI: The Testing Pyramid

Problems with UI Tests


We've been using Selenium WebDriver with Java to write automated browser tests for our eCommerce application ever since the new Fitbit-Boston was formed two years ago.

We have tests for our web application emulating how online customers purchase goods, how customer service agents place orders, such as "Create a standard order containing a year long FitStar subscription and a Fitbit Blaze, with a billing address in the US and a shipping address in Canada, with overnight shipping, paying with a Discover Card".

January 12, 2016

Automate Amazon: Writing a Shopping Cart Test

This post is seventh in a series of nine. Need to go back to the beginning?

Finally! We have the testing framework written!

Now it is time to write a simple test to check to see how we could develop some tests to use this framework.

Let's call our test method in the PurchaseOrderTest class "test_CreatePurchaseForSingleProduct". Our test can be:

1) Go to the Product page, and check the price of a product, such as the mass market edition of the Hitchhiker's Guide to the Galaxy  
2) Add the Product to an empty Shopping Cart 
3) Verify the price in the Shopping Cart Review page is the same as the product.

December 17, 2015

Next Week: Automating Amazon : How I Am Spending My Christmas Vacation

Automating Amazon: How I Am Spending My Christmas Vacation: 


For the past few years, I have been coming up with little side projects during my Christmas break to help deepen my knowledge of the software testing industry.

  • December 2012: Examining the book How Google Tests Software
  • December 2013: Taking Alan Richardson's excellent online course Selenium 2 WebDriver with Java
  • December 2014: I was quite busy! I retook Alan Richardson's course, spent time creating this blog, and I finally created a GitHub account storing Java and Python code samples I could show to prospective employers as I interviewed for automation development positions. Quite handy when I was caught up in a surprise layoff and was searching for automation positions this time last year.
This Christmas, I was going to carry on the tradition!