September 13, 2016

Playing with Protractor: The complexities of testing JavaScript frameworks, according to Vojtěch Jína

Vojtěch Jína, a Software Engineer at Google, finished his Master's thesis, JavaScript Test Runner, at the Czech Technical University in Prague in 2013. Vojtěch talked about, in his thesis, the difficulty developers had when attempting to write unit tests for their code when using JavaScript.

"The language for web applications is JavaScript, which is a very dynamic language without static typing. There is no compiler that could catch mistakes like misspelling a variable name or calling a non existing method on an object - developers have to actually run the code to catch these issues. Therefore testing is absolutely necessary".

JavaScript Test Runner, by Vojtěch Jína
https://github.com/karma-runner/karma/blob/master/thesis.pdf

September 12, 2016

Playing with Protractor: Learning AngularJS by setting up the PhoneCat Tutorial App

Normally, when investigating new automation tools and technologies, my modus operandi is to take a good two or three hours to figure out who created the tool, how the tool evolved, if it was based on earlier work, etc. After all that is done, I spend another hour or so formatting my research notes into a pretty blog entry.

This time around, I wanted to do something different...

Instead of starting with researching which Google employees made AngularJS and Protractor, what projects they both were based on, and how they are used, I wanted to continue what I did the previous blog entry about Protractor, AngularJS, JavaScript and Jasmine, and dive right into the code itself.

This blog is geared towards the manual tester who is attempting to learn automation, exactly where I was back in December 2014. You can read more about that transition in my TechBeacon article, Switching Careers in QA: From Manual Testing to Automation Development.

For this blog entry, I'll walk you through installing the PhoneCat Tutorial App at https://docs.angularjs.org/tutorial. If you aren't familiar working every day with Git or the Command Line interface, and haven't tinkered with using Node.js or the Node Package Manager (npm), every extra bit of instruction helps.

Once you have everything set up, you can go at your own pace through Google's tutorial.

September 11, 2016

Playing with Protractor: Testing an AngularJS application with Protractor, Jasmine, and JavaScript

Yesterday was a lot of fun! I was given an automation development assignment a few days ago in preparation for an upcoming job interview:

Using any technology I’d like, as long as it could be run using freely available software, after filling out a questionnaire given on the company's healthcare web app and writing a test journal post, I was to produce automated checks for the following:
  • An “Assessment Complete” badge appears on the dashboard
  • The journal entry created is present on the journal page.
  • The personality type displayed on the dashboard matches the one given to me in the assessment
What the instructions didn't say was that before each test, you had to navigate a login procedure:

September 9, 2016

Selenium can be slow: When could we use API testing?

A Selenium WebDriver test can be slow. Imagine running a test for a login screen:

... waiting, waiting, waiting... Surprise, it's a browser! ... waiting, waiting, waiting... It's a login screen! ... waiting for SendKeys to enter the username and password into the proper textboxes... and for the Login button to be clicked.


September 3, 2016

Here's to Twenty Years in Testing!

With all that's been going on lately, I missed a very important anniversary...

As of last month, I have spent twenty years in the software testing industry.

How I Started: From a Computer Science Major to a QA Engineer


Unsure how I wanted to apply my Computer Science degree, I left college for a bit during my Junior year at Bridgewater State. Businesses were just starting to invade the web, causing the early pioneers of this new electronic frontier to grumble.

Demand was so high to find people to staff these new "dot.coms", placement agencies were called in to weed through job applications and find good candidates. I found myself at one of these agencies, Sally Silver Contract Services. After testing my analytical skills and reviewing my technical background, some code samples of work I was doing in the classroom, and a rough portfolio from when I spent two years in a college job as a graphic artist / desktop publisher, they asked me, "Have you ever heard of 'Quality Assurance'? Oracle has a new division in Massachusetts, a three month contract position with an option for extension..."

August 31, 2016

Follow Adventures in Automation!

August has been a busy month.

  • Currently, I am searching for new automation development opportunities. 
  • I've spent much of my free time preparing for whiteboard coding interviews, and juggling many, many on-site interviews. 
  • I've been working on a new TechBeacon.com article, "How To Pass A Coding Interview As An Automation Developer". It should be published by the end of September. 

Want to keep up with Adventures in Automation?

  • Follow this blog by the new Blogger.com widget on the right hand sidebar. 
  • Like this blog on Facebook!


Happy Testing!

-T.J. Maher
Sr. QA Engineer

// Software Quality Assurance Engineer since 1996.
// Check out Adventures in Automation and Like us on Facebook!

August 2, 2016

Looking for an automation developer in the Boston, MA area?

Anybody looking for an automation developer in the Boston, MA area? With less of a reliance on Selenium WebDriver / Java for automation, I soon will be out of job!

I have some experience setting up Automated Test Frameworks:
I published an article on TechBeacon, how I switched from manual to automated testing.

My LinkedIn Profile: https://www.linkedin.com/in/tjmaher1
My GitHub account: https://github.com/tjmaher


Thank you very much, and Happy Testing!

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

// BSCS, MSE, and QA Engineer since Aug. 1996
// Automation developer for [ 1.5 ] years and still counting!
// Check out Adventures in Automation and Like us on Facebook!

August 1, 2016

Fitbit-Boston is looking for Senior Software Engineer for new Software Test Engineering dept

Fitbit-Boston is looking for Senior Software Engineer for their new Software Test Engineering department.

Taken from Fitbit's job posting:
"Effective Automated testing is essential to agile software development. All software developers write tests, but some kinds of testing present unique challenges. Fitbit is looking for people with the skills of a good Software Engineering  and the mindset of a tester to solve testing challenges for our teams and raise the bar for test automation at Fitbit".

"As a Senior Software Engineer on the Software Test Engineering Team at Fitbit you will work as part of a product Scrum team on a sprint-by sprint basis to identify appropriate testing strategies, help integrate testing frameworks, and solve testing challenges. Your goal will be to enable the other members of the team to improve automated test coverage."

Note: Fitbit is not looking for automation developers. Fitbit-Boston is looking for Senior Software Engineers who have five years experience in languages such as Java, Scala, and Groovy. See https://www.fitbit.com/jobs/search#jobs/oJ801fwC for more information.

... In other news, does any company in Boston need an automation developer familiar with writing automated test frameworks in Selenium WebDriver / Java? See the Table of Contents of this site to see my skill set.

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

// BSCS, MSE, and QA Engineer since Aug. 1996
// Automation developer for [ 1.5 ] years and still counting!
// Check out Adventures in Automation and Like us on Facebook!

July 28, 2016

SDET Prep: Data Structures: Arrays, Hashmaps and how to implement them in Java.

This blog post is part of a series as I research how to move from Automation Development to being a Software Developer in Test. We covered some basic algorithms, before. These next few posts will deal with data structures, illustrating them with Java. 

As an automation developer, I've been focusing on browser testing with Selenium WebDriver and Java, being able to draw from my decades of experience testing web applications. When it comes to various data structures, I use arrays, lists, arraylists, and the occasional hashmap in my day-to-day work, but that is about it.

A Software Developer in Test (SDET) isn't that far removed from a Software Development Engineer (SDE), relying on data structures and algorithms I once studied as a Computer Sci major back at Bridgewater State. Note: Each link below goes to the respective Harvard University CS50 video, if any.


If you are a manual tester or automated tester and want to shift to software development, Gayle Laakmann McDowell's Cracking the Coding Interview is an excellent summation of all terms listed above. It seems to be a good resource for even Senior developers, who may be far removed from college.

July 27, 2016

SDET Prep: Mergesort: Walkthrough and sample code from "Cracking the Coding Interview"

This blog post is part of a series as I research how to move from Automation Development to being a Software Developer in Test. These next few posts will deal with algorithms.

I've often found good technical videos as difficult to find as good documentation, and for the same reasons... they are geared more towards developers who use the technology day-to-day. The last time I used sorting algorithms on a regular basis such as Insertion and Selection Sort, Bubble Sort, Mergesort, and Quicksort was when I was a Comp Sci Major back in the 1990s. I haven't really seen them while I have been an automation developer.

Luckily, there is Harvard University's CS50 at https://www.youtube.com/user/cs50tv

With our last blog post, we covered the sorting algorithm Insertion Sort, good for sorting small amounts, but not very efficient for large amounts. In this blog post, we are going to be covering an algorithm that is faster for larger amounts... though it does take up a bit of space.

Mergesort


Mergesort is a "divide-and-conquer" algorithm. According to Wikipedia,  "In computer science, divide and conquer (D&C) is an algorithm design paradigm based on multi-branched recursion. A divide and conquer algorithm works by recursively breaking down a problem into two or more sub-problems of the same or related type, until these become simple enough to be solved directly. The solutions to the sub-problems are then combined to give a solution to the original problem".

Stanford University  professor emeritus Donald Knuth -- author of the 1960s saga "The Art of Computer Programming" -- cites the mathematician and computer scientist John von Neuman as inventing the Mergesort in 1945.

July 26, 2016

SDET Prep: Insertion Sort and Learning By Video

This blog post is part of a series as I research how to move from Automation Development to being a Software Developer in Test. These next few posts will deal with algorithms.

When I find my programming skills are a bit rusty from disuse, I find watching educational videos on the internet is the next best thing to face-to-face instruction in a classroom.

With online lessons, I can repeat an example as many times as I want, rewind the lesson, and I can pause the screen to type out the code they are using, playing around with it immediately -- the best way to learn code.

Within the last couple of blog posts, when we started talking about measuring the efficiency of algorithms using Big-O notation, I displayed Eric Drowell's Big-O Complexity Chart of commonly used sorting algorithms.

We are going to cover three of those sorting algorithms in a bit more detail: Insertion sort, mergesort, and quicksort, starting with Insertion sort.

As a reference, we'll use lessons from Khan Academy, and from Harvard's CS 50.

July 25, 2016

SDET Prepwork: What is Big O notation and Logs? Comparing Growth Rate in Algorithms

This blog post is part of a series as I research how to move from Automation Development to being a Software Developer in Test. These next few posts will deal with algorithms.

What is the difference? ... Well, the main thing is that as an automated tester, I haven't needed to worry about Big-O notation and sorting algorithms, such as the ones found on Eric Drowell's Big-O Cheat Sheet.

Big-O Complexity Chart

ExcellentGoodFairBadHorrible

Array Sorting Algorithms

AlgorithmTime ComplexitySpace Complexity
BestAverageWorstWorst
QuicksortO(n log(n))O(n log(n))O(n^2)O(log(n))
MergesortO(n log(n))O(n log(n))O(n log(n))O(n)
TimsortO(n)O(n log(n))O(n log(n))O(n)
HeapsortO(n log(n))O(n log(n))O(n log(n))O(1)
Bubble SortO(n)O(n^2)O(n^2)O(1)
Insertion SortO(n)O(n^2)O(n^2)O(1)
Selection SortO(n^2)O(n^2)O(n^2)O(1)
Tree SortO(n log(n))O(n log(n))O(n^2)O(n)
Shell SortO(n log(n))O(n(log(n))^2)O(n(log(n))^2)O(1)
Bucket SortO(n+k)O(n+k)O(n^2)O(n)
Radix SortO(nk)O(nk)O(nk)O(n+k)
Counting SortO(n+k)O(n+k)O(n+k)O(k)
CubesortO(n)O(n log(n))O(n log(n))O(n)
The Big O Cheatsheet By Eric Drowell


In this blog post, we are going to be focusing on walking through the sorting algorithms Insertion Sort, Mergesort, and Quicksort, and implementing them in Java code.

First things first, though...


What is Big O Notation? 

Big O notation is how computer scientists compare and contrast the efficiency of sorting and searching algorithms, the tried-and-true recipes used to write programs that search through massive amounts of data.

The concept of Big O notation was first introduced and the popularized by the German mathematicians, first by Paul Gustav Bachman, in his book on analytical number theory, Analytische Zahlentheorie, and then by Edmund Landau.

The "O" symbol mentioned in the book was initially an omicron, the 15th letter of the Greek alphabet, showing a formula to show the formula of a rate of growth.

July 24, 2016

SDET Prepwork: What is an SDET? Intro to the Efficiency of Sorting Algorithms: Insertion sort vs Merge sort

This blog post is part of a series as I research how to move from Automation Development to being a Software Developer in Test. These next few posts will deal with algorithms.

What is the Difference between Automation Developers and Software Developers in Test?


Automation Developers Use Code to Create Tests


Have you ever had to perform browser testing on your web application just before a release to production, taking a week or so to do regression testing, making sure that after the new functionality was added that all of the old stuff still worked? And you have ended up staring at the same twenty pages in a variety of Internet Explorer browsers, Firefox, and Chrome, and attempted to make sure the elements on the page are there? That you can still log in? That you can still perform the same actions in all of the browsers? Don't you wish that someone could just write a computer program to do this testing for you?

Create Browser User Interface Tests: When it comes to browser testing, automation developers solve this problem, by pairing Selenium WebDriver with a computer language such as Java to write clean, readable test code that uses basic object-oriented design principles such as:
  • Factoring out any commonalities in your tests into separate methods so it is easier to maintain.  
  • Grouping the web elements and methods that interact with the web elements on a page into Page Objects
  • Creating wrappers for Selenium objects to provide better diagnostics when something goes wrong... Or using the Page Factory to lazy load the web elements initializing them just before you need them.
  • How to use RemoteWebDriver and implement different browsers into your testing with Selenium Grid, Browser Stack or Sauce Labs.
Write Performance Tests: An Automation Developer deals with Stress Testing, Performance Testing and Load Testing using tools such as Apache JMeter.

Script Database Tests: Want to make sure that the data entered in the browser user interface is stored correctly in the database? Use libraries in your favorite programming language that handle opening connections to the database, and SQL scripts that query that the data was placed in the correct table.

As an Automation Developer, you might be working with Arrays, Lists, and ArrayList to assemble and store data, for loops and foreach loops, but their focus is on creating the tests.

Software Developers in Test Use Code to Write Test Frameworks



Software developers in Test take what the Automation Developer does one step further.

From the Microsoft Developer article, What is an SDET? 

"The SDET role can be compared with that of the SDE (Software Development Engineer) role. The latter is what most people would think of when they say 'Developer'. An SDE (depending on level and seniority) will Architect, Design, and Implement software systems that will be used by the target end users. SDEs are responsible for the quality of their software and will implement testing (often unit tests), as well as seek reviews for both their designs and their code. SDEs will often have influence on the software processes employed, and be responsible for following best practices in software development.

"The SDET is also a developer. The SDET must have knowledge of what represents good software design. The SDET must be able to create high quality, maintainable [...] code. The code generally created by the SDET however are for automated test cases and the frameworks to execute and report them. An SDET’s knowledge of software design is often focused on testability, robustness, and performance, and they usually play a contributory or reviewer role in the creation of designs for production software. An SDETs skill set will often include more experience in software processes and how to test software. Testing software is generally  done so as to assess and mitigate risk, and SDETs need to be expert in this. So an SDET can be summarized as having development skills and software quality skills. While SDEs should have this also, SDEs balance more towards the former while SDETs balance more towards the latter".


From talking to other Software Developers -- both in Test and in general -- I've gathered that if you want to make the switch, you really have to start thinking more about performance.

They need to focus on:
  • Figuring out how to store data more efficiently in data structures such as stacks, queues, linked lists, hash maps, heaps, and binary search trees.
  • Learning what a linear sort is and why it is inefficient, and figuring out different ways to search through data studying known search algorithms and sorting algorithms such as binary search, quicksort or mergesort. 
  • Understanding where you want to focus on: If memory is at a premium, you want your solution to use the minimum amount of space possible. If time the major factor, you want to make your solution as quick as possible. Your solution should take into consideration these space complexities or time complexities
  • Comparing and contrasting how fast your solution is using Big-O notation, and figuring out if your solution you are using will scale.

July 11, 2016

Test The-Internet 2.0: Setting up Selenium Grid: RemoteDriver and DesiredCapabilities

Recap: Since May 2016, we've been blogging about forming a new automated test framework using Dave Haeffner's test site, The-Internet.

Picking Gradle as the build tool, we walked through how to create unit tests, just to make sure everything is still working as we make changes to the project, setting them up in JUnit and Hamcrest in both IntelliJ and Eclipse.

Like the two frameworks we built last year, we are using CSS Selectors to find the web elements on a page. We grouped together pages using the Page Object Model and PageFactories. After walking through the reader with experimenting with first Selenium Grid and then Docker, we set up Selenium Grid using official Docker images from Docker Hub.

... I should call this blog post, "How I spent my summer vacation". Each time we rewrite our test framework, I experiment on this blog with tools and technologies we are using at work. Instead of spending four hours reading a technical manual, I'm spending the same amount of time getting my hands dirty, taking notes all along the way. It takes no time at all to turn all that research I collected into a blog post.

With this blog post, we will be using RemoteWebDriver to bring in the browser nodes listed in our Selenium Grid, connecting them with DesiredCapabilities to help run our tests.

July 10, 2016

Introduction to API Testing with Postman and Newman

Postmanhttps://www.getpostman.com/ ) is tool they use at work to test APIs... along with Swagger, Pact, and Java with Apache HTTPComponents. Postman comes in two versions ... as a Chrome app or a Mac app. They seem similiar, except the Mac app "is packaged with add-ons that make request capturing and cookie handling seamless" according to Postman's documentation.


What is an API?

"Application program interface (API) is a set of routines, protocols, and tools for building software applications. An API specifies how software components should interact and APIs are used when programming graphical user interface (GUI) components. A good API makes it easier to develop a program by providing all the building blocks. A programmer then puts the blocks together". - Webopedia

Need to get up to speed on APIs?

REST API Concept and Examples:



Brought to you by JelledTV's WebConcepts YouTube channel, "This video introduces the viewer to some API concepts by making example calls to Facebook's Graph API, Google Maps' API, Instagram's Media Search API, and Twitter's Status Update API.

If you want to find many other sites that use APIs, go to ProgrammableWeb.com.

... They also mention how to use this new tool that came out... Postmanhttps://www.getpostman.com/



July 9, 2016

Using Docker + Jenkins for Continuous Integration: Assorted Links

So much to do! So little time! There are so many pieces I need to add to my new little automated test framework, Test_TheInternet_2.0 found at https://github.com/tjmaher/Test_TheInternet_2.0. You can see what is on my "wish list" at the end of this blog post.

But what I really want to do is experiment with setting up my own Jenkins environment on my home system, something DevOps does at my workplace. I create, at work, Jenkins jobs to run tests, but it is not the same thing as being able to tinker with Jenkins Plugins, set up the system, etc.

I found out the other day that on Docker Hub, Jenkins has its own Docker imagehttps://hub.docker.com/_/jenkins/! That is definitely something I really want to tinker with.




Instead, here are some links that I was planning on checking out that I wanted to share with you. I probably won't be able to get to this for another few months or so, at the rate I am going:


The plan is to finish off the automated test framework we started: Test_TheInternet_2.0. You can see the source code at https://github.com/tjmaher/Test_TheInternet_2.0
  • RemoteWebDriver: Taking our DesiredCapabilities we touched upon, and expand it. 
  • Docker Composehttps://docs.docker.com/compose/: Bundle together scaling up or down Selenium Grid browser nodes, downloading Selenium Grid, starting up a Hub, and starting up various nodes.
  • MicrosoftWebDriver: ( Link ): How to incorporate Microsoft Edge into your tests.
  • Microsoft Virtual Imageshttps://developer.microsoft.com/en-us/microsoft-edge/tools/vms/ add IE8, IE9, IE10, IE11 on Windows 7 or IE 11 and Microsoft Edge to Windows 10 nodes to your Selenium Hub! Just use VirtualBox, Vagrant, HyperV (Windows), VMWare, or Parallels (Mac). Take a snapshot of the images because the originals are only good for 90 days. (What, no Docker solution? Gee, Microsoft, do you always have to be different?)
  • Selenium Grid Extrashttps://github.com/groupon/Selenium-Grid-Extras
... I also want to check out what Sauce Labs has for its own sample test framework in Java-Junit-Selenium: https://github.com/saucelabs-sample-test-frameworks/Java-Junit-Selenium

As always, Happy Testing!

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

// BSCS, MSE, and QA Engineer since Aug. 1996
// Automation developer for [ 1.5 ] years and still counting!
// Check out Adventures in Automation and Like us on Facebook!

Notes: Introduction to Artifactory, build tools, binary files, and binary repositories

With this blog post, I wanted to talk about a tool we are using at work, JFrog Artifactoryhttps://www.jfrog.com/artifactory/  to store our dependencies and our binary files. Whenever I start learning a new tool, I always search for online demos of the new tool, introductory YouTube videos, and free training classes and webinars. Sometimes, I am pleasantly surprised...

If you are a newly minted automation developer, you might not know that there is a lot more to the software development process than just writing code:
  • A Selenium WebDriver / Java test depends on the Java bindings for Selenium (the selenium-java library) to be downloaded and usable for your Selenium / Java project. 
  • The tests need to be built and compiled into some type of form before they can be run. Build artifacts, such as JAR (Java Archive) files, need to stored somewhere until they are ready to be used.

Artifactory helps by providing a way to store both the dependencies and the files produced. And their webinar might help put technical concepts in context, things that a manual tester may not be familiar with: build tools, Maven, Gradle, binary files, blobs, diff tools, and source control systems.

Build Tools -- such as Maven and Gradle -- automate the creation of executable applications from source code. The build process incorporates downloading dependencies -- such as Selenium-Java in a Selenium WebDriver / Java project -- compiling, linking and packaging the code into a usable or executable form -- such as a JAR (*.jar) file in a Java project.

July 7, 2016

Setting Up Selenium Grid with Chrome and Firefox browser nodes from Docker-Selenium

Please Note: This blog post will be using the official SeleniumHQ's Docker-Selenium project, not Leo Gallucci's Docker-Selenium project

We will be experimenting, in this blog post, with installing Docker, deploying Selenium HQ's various Chrome and Firefox Docker images, regular versions, and using them with their Docker image of Selenium Hub.
Later on, we will tie this in with my BasicWebDriverFramework_Gradle, including into the project our work with PageFactories, and adding RemoteWebDriver and DesiredCapabilities functionality. In the post after this, we will build on this information, using Docker Compose to scale Selenium Grid.

Dockerhttps://www.docker.com/
SeleniumHQ Imageshttps://hub.docker.com/u/selenium/
Docker-Composehttps://docs.docker.com/compose/
Why install Selenium Grid in a container system like Docker? Docker is built to help make configuring systems easier, helpful if you are setting up Selenium Grid with one Selenium Hub and multiple Chrome and Firefox nodes.

Normally, to set up Grid, you would:

  • Download Selenium-StandAlone-Server
  • Start up the Selenium Hub: java -jar selenium-server-standalone-2.53.0.jar -role hub
  • Start up various nodes: java -jar selenium-server-standalone-2.53.0.jar -role node -hub http://localhost:4444/grid/register -browser browserName=firefox,maxInstances=2 -browser browserName=chrome,maxInstances=2
... Then the Selenium Grid would be ready to use at http://localhost:4444. 

With Docker, it is still that same three step process... except we can bundle all of those three steps into one with Docker Compose. That is for later blog posts. First, though, let's talk about Docker...


July 5, 2016

Selenium Conf India 2016 Talks: Placing Selenium Grid in a Docker Container

Selenium Conference India 2016 was held June 24, 2016 to June 26, 2016 in Bangalore. It's like Christmas for me, after every conference when they release the presentation slides the presenters used, indexing them all on the schedule at https://confengine.com/selenium-conf-2016/schedule. Simon Stewart, creator of WebDriver, gives his State of the Union. Automation developers showcase their work. You get to see what other automation developers are doing with the tool.

Videos usually are released a few weeks after the event.

I noticed that there were two talks and a workshop that dealt with a technology I was tinkering with for the past few months: Setting up Docker Containers. They were pairing Selenium with Docker to help them with testing.

July 4, 2016

Setup of Selenium Grid for Beginners: Brace yourself! We're Using the Command Line

Are you a manual tester who really wants to tinker with setting up Selenium Grid with your automated test framework, but is skittish about using a Command Line Interface? This blog entry is an attempt to walk you through it, every step of the way. Is there a detail I missed? Anything too vague? Please let me know in the comments section, below. Using the Command Line is tough, but it is something every tester needs to get used to... with time, you will have fun using it. (Or that is what I keep telling myself! :) )

  • Don't have an automated test framework set up? Take a look at a basic one I have for IntelliJ and Eclipse.

For this example, I will be setting up Selenium Grid a Windows 10 box, what I use at home. Feel free to set it up on whatever Mac or Linux/ Unix operating system you have. We aren't going to be doing a deep dive on any of the moving parts. That will come later. This article is focusing on the setup.

Directions can be found on SeleniumHQ's Grid 2 GitHub site: https://github.com/SeleniumHQ/selenium/wiki/Grid2

July 2, 2016

Setting up Docker the "easy" way on Mac or Windows: The Docker Toolbox and the Get Started Guide

Toolbox installer
It's the Docker Toolbox for Easy Installation!

I've been on a quest since I became an automation developer, documenting everything I have been doing adding to the automated test framework at my workplace. Because I didn't start at square one, there are things I wonder about...

The Past: Browser images on Virtual Machines


When performing browser testing around a decade ago, I used to use VMWare to setup numerous virtual machine images for my testing team. The images contained the multitude of browsers and platforms configurations we needed. I would configure and place them the shared drive at whatever company I was working on. If we wanted to see how our web application looked on a clean install of the now defunct Netscape Navigator and Windows NT, and compare that with IE6, IE7, and IE8, our entire testing team could blow away whatever previous virtual machines they had on their desktop, and copy whatever was needed that day to their computer.

I am on a quest to find that type of ease-of-use.


July 1, 2016

Blogging about automated testing frameworks

When I first started this blog, my undergrad and grad school degrees in computer science and software engineering were gathering dust! What a difference a few years makes.

This blog started way back when I was still trying to break into the automated testing field. It became more than that once I was hired at Fitbit-Boston, embedded in the team developing automated test frameworks. I started writing about:
As a manual tester, I loved getting paid to explore and understand new technologies, see how they do (or don't) work. As an automated developer, there are so much more technologies to explore!

Selenium Conference 2016

Ugh! I always feel so far behind... Selenium Conf 2016 happened in Bangalore, India back in 6/24/2016 to 6/26/2016, a whole four days ago, and I still haven't had any time to check out their schedule...

I love that they turn their schedule posted on the web as a way to archive the presenters videos and slides. https://confengine.com/selenium-conf-2016/schedule

What I am excited about is:


This is exactly what I was looking for!

... I wonder if over the Fourth of July Weekend I can fit in a spare day to watch these videos, take notes, and turn them into new blog entries?

As always, Happy Testing!

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

// QA Engineer since Aug. 1996
// Automation developer for [ 1.5 ] years and still counting!
// Check out Adventures in Automation on Facebook!

June 30, 2016

Test The-Internet 2.0: Page Factories: Setting up, creating them, and understanding how they work

Let's say we wanted to automated a Login Page such as the one on Dave Haeffner's test site, The-Internet. How would we find the username, password and Login button so we can enter the appropriate text into the appropriate text boxes?


Dave Haeffner's http://the-internet.herokuapp.com/login
Like we did last July, we would make sure that Selenium WebDriver methods such as sendKeys (to enter text) and click (to click on a button) were safely wrapped in a set of common utilities, then call these new methods by selector, such as css or id.

... Or we could just use the PageFactory.


Using it is relatively simple to implement, as shown in the illustration below. Reading the JavaDocs and understanding how it works is much harder.


June 22, 2016

June 15, 2016

Building a Test Framework: With Gradle, everything is Groovy

So far, we've seen how to set up the build dependencies in an automated test framework, using Gradle in both IntelliJ and Eclipse. Gradle is more than just a tool to set up build dependencies between third-party software and the Selenium WebDriver framework.  And with the hands-on learning you get from free courses that Gradle, Google, and Udacity put together, you can learn about how Gradle configures tasks, interacts with the file system, handles logging, works with repositories, and sets up tests.

I am really loving how Jeremy Silver explains things in the Gradle for Android and Java course he created on Udacity! Go here to sign up for the free course.

Although I studied it in college and grad school, I have not spent much day-to-day work as a coder until the past year. I love how he walks us through, step-by-step how to follow along with the Gradle exercises he has written, and how Gradle has been integrated with Groovy, a Domain Specific Language (DSL).


June 12, 2016

Free Udacity Course: Gradle for Android and Java

Want to more about Gradle? Sign up for a free course on Udacity!

Gradle for Android and Java 
https://www.udacity.com/course/gradle-for-android-and-java--ud867

https://www.udacity.com/course/gradle-for-android-and-java--ud867


When putting together an automation framework using Selenium WebDriver and Java, you need a way to store the dependencies. This is so you don't have to end up downloading every single third-party component, piece-by-piece. When I was taking a course in Selenium WebDriver 2 with Java, I was introduced to a tool called Maven to do this for me.

Maven was a pretty simple tool to set up. Gradle, though, is a bit more complex.

We have been using Gradle at my workplace ever since I first started my job as an automation engineer. It never was my job description to set up all the initial dependencies, the reporting and logging, design the build process, or set up the tasks, so Gradle was just another buzzword to me.

Lately, though, the senior members of the team have been using a lot more of its functionality. This is why, all of a sudden, blog posts on Gradle start appearing, such as:

A Free Course in Gradle!


I was referred to a free course on Gradle through Gradle.org and its tutorial section.

The course was put together by Mark Viera, Core Engineer at Gradle, and Jeremy Silver, a Udacity course developer.

June 10, 2016

A Quick Gradle Overview: Setting Dependencies and Running Tests

Since January of this year, our little automation department at work has been trying to re-align itself, getting more in line with what the other software developers are doing -- a fantastic (but scary) learning opportunity for me.

Back in March 2015, I was trying to relearn for loops and foreach loops in Java. By September, though, I was helping build out the automation framework for our Selenium WebDriver browser tests -- See Automate Amazon for a sample. And by January 2016, I thought I was really becoming an experienced developer, independently writing a framework to handle Rest APIs. All the extra work I was putting into learning to code was really paying off.

Now, I feel like I don't know anything!

We are switching from being an "Automation Department" to being a "Software Test Engineering" department, from just running browser tests to testing APIs and performance testing. I find myself experimenting with many languages and tools that are brand new to me... and one of them is the build management tool, Gradle.

Maven and Gradle: Setting Dependencies


As far as I knew, a build management tool was something you set up once at the start of the project to handle the dependencies, installing the tools you needed to create the framework, and then forgot about them.

June 8, 2016

Time Capsule: Ward Cunningham's Wiki Wiki Web

What year is it?

The last think I remember, I came home from work early, and sat down in front of my computer. I decided on browsing Ward Cunningham's Wiki Wiki Web  -- now over twenty years old!  -- as I have been doing lately, trying to get a feel what it was like in the early days of the Extreme Programming movement which became the Agile Alliance. Time sped by, and the next thing I knew it was close to midnight.

http://c2.com/cgi/wiki?WikiWikiWeb

What is Wiki Wiki Web?

From Wikipedia:
"The WikiWikiWeb is the first ever wiki, or user-editable website. It was launched on 25 March 1995 by its inventor, programmer Ward Cunningham, to accompany the Portland Pattern Repository website discussing software design patterns. The name WikiWikiWeb originally also applied to the wiki software that operated the website, written in the Perl programming language and later renamed to 'WikiBase'. The site is frequently referred to by its users as simply 'Wiki', and a convention established among users of the early network of wiki sites that followed was that using the word with a capitalized W referred exclusively to the original site".

"[...] The software and website were developed in 1994 by Cunningham in order to make the exchange of ideas between programmers easier. The concept was based on the ideas developed in HyperCard stacks that Cunningham built in the late 1980s. On March 25, 1995, he installed the software on his company's (Cunningham & Cunningham) website, c2.com. Cunningham came up with the name WikiWikiWeb because he remembered a Honolulu International Airport counter employee who told him to take the Wiki Wiki Shuttle, a shuttle bus line that runs between the airport's terminals. 'Wiki Wiki' is a reduplication of 'wiki', a Hawaiian language word for Quick. Cunningham's idea was to make WikiWikiWeb's pages quickly editable by its users, so he initially thought about calling it "QuickWeb", but later changed his mind and dubbed it 'WikiWikiWeb'.

Since I have been trying to somehow turn into a Real Programmer, I have spent a lot of time trying to learn how to incorporate Unit tests and Software Design Patterns into my automation development.

I stumbled on this site last year when I was trying to search for tips on Object Oriented programming.  and found out there were many definitions for what that means.

Watch out! You can spend hours trying to Find a Page and end up sucked in just like me.

Here are a few fun entries I found:

Writing Code


There is a huge section on Extreme Programming and Test Driven Development by Kent Beck that I would list as required reading for any manual QA person attempting to get into software development.

Make sure to read all about the Agile Manifesto.

After that is done, you can read about Software Design Patterns ( and the Gang of Four ) which help and AntiPatterns which hinder.

Around my workplace, the developers still talk about Design By Contract.

It also has entries on the two text editors still favored:

It has pages on the two main Integrated Development Environments (IDE) used now:

Writing Tests 


When it talked about Testing Frameworks I expected the section for JUnit written by Kent Beck and Erich Gamma. It also has a section on TestNG, added six years ago, probably by it's creator Cedric Beust.

They also cover various typed of Automated tests such as:

Building Software


What intrigued me is showcased build tools such as:

... Nothing yet on Gradle, though, a build tool we are starting to use more extensively at work.

Wiki Wiki Web. It's a nice little time capsule.

Happy Testing!

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

// QA Engineer since Aug. 1996
// Automation developer for [ 1 ] year and still counting!
// Check us out on Facebook!

June 2, 2016

What I get out of blogging about code

On my lunchbreak, I was trying to explain to my co-workers what I get out of blogging about code I am writing at work. 

You know the expression, if you really want to see if you know something, try describing it to someone else? 

That's why I blog. 

Software development is brand new to me. It was scary when I first started. I was completely out of my comfort zone. But it got better. 

What I am learn at work has been a good foundation. There, I learn about the what, and the how.

It isn't until I start organizing my thoughts, creating a blog post, do I figure out the why.
  • How did the software development process I am using take hold? Who first blogged about the concepts I am using? Was it Kent Beck? Martin Fowler? Simon Stewart? Jim EvansUncle Bob
  • Who made the toolset I am using? When did it become adopted? Is it industry standard?
  • Although I may not understand it, where on GitHub is the open-source code? Can I understand how their project is constructed? Are there unit test formats I can borrow for my automation development? 
Through blogging, for me, comes understanding

And that's my thought of the day!

Happy Testing!

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

// QA Engineer since Aug. 1996
// Automation developer for [ 1 ] year and still counting!
// Check us out on Facebook!

June 1, 2016

WebDriver development environment setup with Eclipse, Gradle, Hamcrest, and ChromeDriver

We started writing at work a new way of configuring an automated test framework. The original idea I had was that I could just bang out a simple automated test framework as practice, refactoring what I already have written in the past. When I started researching the new toolset, and my research notes were piling up, I then had the brilliant idea that this topic would make a lovely blog post.

I wrote about using IntelliJ. A reader asked me, What about an Eclipse version?

With this blog post, I will walk you through downloading Eclipse IDE for Java Developers, installing Buildship (the official Gradle plugin for Eclipse), setting up your Java environment, configuring Gradle, installing ChromeDriver, and creating quick-and-dirty WebDriver JUnit Tests, making assertions in the tests using Hamcrest, and refactoring those tests when we come across duplicate code.

This is a different setup than programming projects I have done before. We are using:
  • Eclipse  with Buildship will be the Integrated Development Environment (IDE).
  • Gradle to handle our dependencies, instead of Maven
  • JUnit 4.11 as a test framework instead of TestNG.
  • Hamcrest to handle the asserts, instead of the usual AssertTrue or AssertFalse found in JUnit or TestNG.







Please Note: You don't need an Integrated Development Environment (IDE) to code, just as you don't need Microsoft Word or any other word processing program in order to write a research paper. It is just easier to those who are more used to working with a Graphical User Interface.

If you want to be seen as a programming rock-star, learn to code in vim or emacs on a Unix command line. Me, I am more of a visual person and need the crutch of an IDE while coding.