Learn automation while you don't need it

I have been a software manual tester for 10 years.

Due to the regression tests that I do every other week, it is imperative that I get this function automated to help me with the rest of my job.

I regression test over 90 custom sites for my company and really need to get this done by February 2017.

Please help.

I received this message from a tester a few weeks ago.

He wanted to learn automation and programming and use these skills successfully in 2 months.

Which is very difficult to do.

I don't know why he did not start learning earlier.

He probably thought that will not need automation and his employer will hire a developer for the automation work.

So he did what many people do in similar occasions: postpone.

We don't like change and avoid it.

Our hope is that somehow things stay the same or we figure them out.

And a moment comes when we need change fast and results too.

This is when we realize the mistake of not starting ahead of time, when we don't need the new skills yet.

Fast change happens in stories and movies only.

Real change takes time and is done in small steps.

So, stop postponing learning programming and get started.

It does not matter if you need it in your job now or not.

You will need it sooner than you think.

Next December, you will be very happy that you started learning automation the year before.

What do you need for a Selenium test automation job?

First, the obvious.

Since test automation is programming, you need to know the basics (more if possible) of a programming language such as Java.

And you need to know the basics of the Selenium WebDriver framework.

But this is not sufficient for getting an automation job.

In an interview, you have to convince other people that you know how different things work in Selenium and Java.

For example, 
  1. what is boxing in Java?
  2. what is the difference between method overwriting and overriding?
  3. what is the page object model?
  4. what are the fastest locators?
This requires practicing explaining how things work, what they are and how they should be used.

You still need more for that new automation job.

You need 500 hours of practicing Selenium and Java.

The number of hours is different from person to person.

Some people may need less, others more.

But it is essential that you put the time in for the practice.

Why so many hours?

Because companies will put you to test.

There are 2 types of tests that you may have to do:

1. JAVA coding test
This test happens before the face-to-face interview and is a condition for it.
It is usually done online on a site like codility.com and it can last around 1 hour.
You are given a problem and have to write code that solves it.


2. SELENIUM automation test
After the face-to-face interview, if the interview went well, you may be asked to do the automation exercise.
This test is about automating a scenario for a site.
You may get 1 day or more to do it.


Going back to the 500 hours practice.

It is very difficult to do well at these exercises if you are not already proficient with Java and Selenium.

Because the time for doing the exercises is limited.

And your solutions have to be very good to get the job.

Best Resource for Improving Selenium Skills? Selenium code

You learned Selenium and Java test automation basics from a book, online course or youtube. 

Page object model is understood, locators are clear, explicit waits and expected conditions are straightforward.

Java concepts such as classes, objects, inheritance, looping, arrays, lists are all covered.

With the new skills, you can write test automation scripts for a variety of websites.

You are wondering now about the next level of test automation.

There is always a next level so what is it for you?

How do you go to it?

What resource should you use for guidance?

Most available books and courses target the beginner and intermediate test automation levels.

There are not many resources available on advanced test automation skills.

There is one place however, often forgotten, that has everything you need in your quest to more knowledge.

The Selenium source code.

It is extremely helpful not only to learn how to use Selenium but also to read the source code.

Doing this provides many benefits such as:

1. it shows how Selenium classes and methods work

For example, how does Selenium find a web element using the findElement() method?
How does Selenium locate an element by css locator?

2. you can learn how a framework is built

Selenium is a framework.

You can learn many things about building an automation framework from studying how the Selenium framework is built.

3. you can learn what good programming is

Selenium was created by professional developers.

What better source of learning than the code that they wrote?

4. you find out what you dont know yet but should know

For example, by reading the Page Factory code, you will learn about annotations.

And reflection.

And design patterns.

And proxy classes.

And generics.

And interfaces.

You will need all these Java concepts (and more) to make the transition to the next test automation level.

So attach the Selenium source code to the project in Eclipse and start reading.

When do you need these new skills?

Lets say that you want to have in your automation project the ability of taking screenshots automatically when an exception happens in a test script.

You use TestNG as the unit testing framework.

TestNG listeners can help but there is a problem.

You need in the test listener the driver object created in the test class or the base test class.

To get this driver object, you will use reflection and generics. 

Another example of using the new skills is creating new locator types.

Selenium provides by default a variety of locator types such as id, class, name, xpath, css.

How about using also Jquery and Javascript locators?

You will need annotations for this.