How To Learn Programming or Coding For Automation Testing

Mukesh Otwani, in this video, explains an easy method and guide for beginners to learn to code for testing automation.

Being an Engineer, learning programming is inevitable and at some point, you have to learn a language or the other. You might have read about other’s steps to learn to code too, but here we’re sharing what we think are the easier ways to go.

Coding is a logic-building skill with a touch of syntax, Mukesh at 0:48 mentions, it’s not like you start it today and think you can master it within days or even a week. You will master it eventually but it requires a lot of time and concentration to ace the programming.

Steps to learn Programming

Following are the steps you can follow to learn the programming language.

1. Fundamentals

At 1:22 Mukesh tells us about Fundamentals are the first and key step to learn any programming. Be it Python, Java, or C, whichever programming language you are learning, understanding how those programming languages works are the key.

You need to understand how the functions and classes of certain languages work. Once you have learned the fundamentals, the question arises where to use these concepts? At 2:00, he answers the question as being a new programmer, you’ll get confused about where to use FOR LOOP or where to use WHILE loop?

How to implement what you have learned so far? The answer is, you should take a project, not a real-time project of course. Practice your lessons on it and then match the outputs you are having. Start working on smaller projects and increase the complexity as you master the coding. This takes us to our next step.

2. Projects

  • Project version 1

So, let’s take java programming, for example, pick a simple project and test your skills with that. If you think the project was too simple, move to an advanced level. At 3:18, Mukesh provides the first project idea of JAVA for you to work on. Here is what your program should do.

Your application/program should ask the user to input the following data:

  1. How many members/people you want to add to the server?
  2. First name
  3. Last name
  4. Email
  5. Phone number
  6. Location

Now suppose the user wants to add 5 people to the server, then you should ask the further details of the first member like name email, and location. Then run the loop again to ask the same details about the second member and so on. For n number of people, the loop should run n times to take data from the user. When the user has provided all the details, you can choose to store that data directly into the server or a locally located excel sheet.

Even this is a 30 minutes project, you might wonder which of my fundamental learnings of java will be used here. So, here is a quick hint.

Use Scanner class to take input from the user

import java.util.Scanner;  // Import the Scanner class

class Main {

  public static void main(String[] args) {

    Scanner myObj = new Scanner(;  // Create a Scanner object

    System.out.println(“Username Here“);

    String userName = myObj.nextLine(); // Read user input

    System.out.println(“Username is: ” + userName); // Output user input



You don’t have to worry about the syntax as you will have learned it in the first step. 

  1. As the data provided by the user is not static and he/she can put any number of people to insert to the server so you will have to run the LOOP accordingly. You will be using FOR LOOP to run the loop in the program. You will require a List to store user information and you will require a dynamic Array, again, to save the dynamic data. You will be using MAP to store KEY VALUES (user information). All this is done in a class and when done passed to the database.
  2. To store the data on the server, you’ll have to first learn about JAVA DATABASE CONNECTIVITY.  You will be using an external library to connect to that server and store the required information.
  3. Additionally, when you enter the data into the server, basic knowledge about SQL is a prerequisite. You should know how to write SQL QUARRY, INSIDE QUARRY, and DELETE QUARRY. 

That’s it. Your first project is completed. This seems difficult on the first site but when you get to know more about it, you will understand that there are more than one approaches to complete the program. 

  • Project version 2

You can also, as he tells at 8:24, use exception handling techniques to make your program more complex so it should take less compiling time, less space, and less syntax writing time, however all that comes with experience. You can provide the options in your advanced program for users to search through the details and edit or delete those details from the server. This can be your version 2 project and you can make it as advance as you can.

At 9:12, Mukesh shares another simple project idea for you to test yourself. Suppose your Computer Desktop has many types of files on it including PNG files, Word Files, and a once .txt file. Your program should be able to keep your desktop clean and move those files into their respective folders. You can add as many utilities in the program as you won’t like it should print the message that no files to arrange if there are no files on the desktop. Also, you can set the timer for the program to run and clean your desktop.

For practice purposes, you can also build a web scrapping tool for yourself. There are many ideas to go with and you should choose the one you think is interesting and worth doing.

3. Automation Projects: 

Mukesh at 10:30 in this video, speaks more about the topic saying, it’s easier to run the program on local servers and there is less chance of any error to pop up. But once you jump to Web Automation and deal with the live server, you might encounter many new issues so, it should be your next target when the previous two are done and you have pretty mastered those.

You can test the following three scenarios to teach yourself.

  • Web Scenarios
  • API Scenarios
  • Mobile Automation

The preferred choice of these three should be the first one as it involves visible steps to showcase to you what your code is capable of. APIs mostly run in the background and only show the output however Web Automation is more of foreground work and you will see most of the processes yourself. If you don’t have the first two options, you can move for the third one which is not highly encouraged. 

If you encounter any errors, which you will, you should first learn to solve them yourself. You can google the same error and will see many developers talking about the same issue and providing multiple solutions.

4. Stack Overflow:

Talking about removing issues, at 13:55 Mukesh lines out many options to get your errors removed. Following should be the checklist to follow while removing issues.

  1. Try resolving yourself.
  2. Seek Google help
  3. Check the solution on YouTube, Facebook, LinkedIn, or Twitter
  4. Ask your mentor who has done the same project

The order is chronological and should be followed in the same manner.

5. Stay Updated:

When you will join these communities online, sharing the same interest, you will learn a lot about updates, errors and solutions, and other developments. Learning programming is a continuous process you should keep yourself well updated.

This was all technical perspective as Mukesh says at 15:07, but you cannot succeed with these practices alone. Advising someone to sit four or five hours to type a dry code is a hectic thing but you should build a habit to take interest in it. 

Time Block Technique

 Hence Mukesh advises at 15:25 following method to teach yourself. There are a lot of online resources available to help you teach the code but to make coding your habit, you’ll have to push yourself. With the Time Block Technique, you can block your time for a particular task and only perform that task in a given time and stay disciplined. Initially, you can dedicate two hours for coding meaning 60 hours monthly, which is too much to ask but you will get through eventually.

At 17:36 he says that you can choose your learning hours according to your habits and routine, if you’re good at working in the morning set the morning routine. If you are a person who is more productive at night, this is also fine. Cutting short, you can choose any time and even divide the time into parts and learn in shifts to maintain the interest.

Key Takeaway

From this video we learned the following main point:

  1. Learn Fundamentals
  2. Practice what you learn on small projects
  3. Project examples to practice on
  4. Learn on live servers and automate web
  5. Try to solve the errors yourself or seek online help
  6. Join online groups to keep you updated
  7. Teach yourself to give time to pogroming daily and make it a part of your daily routine.
Was this article helpful?
Dislike 0
Views: 5
Back to top button