test automation interview questions

6 Years Experienced QA Automation Engineer Interview Experience / Test Automation Interview Questions

Test Automation Interview Questions

ThoughtCoders supports job seekers and guides our trainees to crack job interviews. In addition, in this series today we are publishing one of the best interview experiences (test automation interview questions). Accordingly, have a thorough look into these test automation interview questions. Moreover, the Test Automation Interview Questions or Senior QA Interview is divided into four sections. The first part is Automation framework knowledge, the second part is functional testing, the third part is API Testing, Performance, and the fourth part is SQL knowledge evaluated.

Here are the ultimate Senior test automation interview questions with answers.


1. Could you please introduce yourself?

Hi, Myself Sherry, I have 6+ Years of experience in QA Automation. Currently, working as Automation Test Engineer with XYZ Bank. I have 4 Years of experience in Automation, above all, 2 Years of experience in Function Testing with experience in various fields for instance Automation framework development, framework maintenance, and automation scriptwriting, in addition, I am well versed in Selenium, Java, Cucumber, JDBC, Backend Automation, API Testing, Rest Assured, SQL, POSTMAN, Junit, Testing, DevOps, Agile and Functional Testing, in addition, I have experience in Regression, Integration, System, and Performance Testing.

2. Could you please explain your automation framework?

I am working on the BDD framework which has three major components, the First component is feature files which are basically test cases written in Gherkin language, the second component is step definition which is the implementation of feature file and the third component is runner class which is used to run feature file. In addition, I used Maven as a dependency manager.

In this framework, a few more packages are also there one is Page package, Utilities Package, ListnerersPackage. Above all, the inPage package has page classes. In other words, each web page has a separate page class where web elements are stored.

After all, in addition, in the utility package, a few utility classes are written to read CSV, JDBC connection, excel reader, and test data generator class.

3. Please explain what kind of reporting you used in your framework?

Basically, an Extent Report is used in my current framework and it is customized with WebDriver Event listeners. In other words, another key point is that it captures test failures, logs, screenshots on test failure.

4. Could you please explain your projects completed?

XYZ Bank

In XYZ Bank, I worked on a web-based trading platform. Therefore, using this platform users can buy share and sell. Moreover, in this project, I have automated the regression test cases using Selenium WebDriver, Java, Cucumber, and JUnit. Above all, my responsibility is to write a new automation script, maintain the automation framework execute the automation test suite, and share automation results with Stakeholders.

XYZ Health System

I worked on one CRM Portal which is used to track customer health inquiries, their policy status, plan details, payment status, settlement, and reconciliation.  In addition, I have developed an automation framework from scratch which was developed using Selenium and Rest Assured. Similarly, web-based cases are automated using Selenium while Backend test cases are automated with Rest Assured and JDBC.

DressiCo Barnie

In DressiCo Barni, I worked on nonfunction testing. I did performance, visual testing, and accessibility testing. Altogether, in this project, I worked on JMeter, Postman, Soap UI. Wrote SQL queries to fetch repo reports measured performance. In addition, in performance testing, I tested the application on the concurrent user, gradually increasing load, screen opening time, API Response time on different loads, and screen opening time on different various loads.

XYFG  Bank

In  XYFG  bank, I worked as a QA Automation engineer where I built the BDD cucumber framework and also performed accessibility testing as per WCAG 2.0 AA and WAI-ARIA standards. Performed accessibility testing using JAWS, NVDA, Talkback, Voiceover, and WAV tools. However, my additional responsibilities were bug reporting, follow-up with the developer using JIRA, Integration Testing, Regression Testing, and post drop validation.

5. What are your day-to-day job activities?

 My day start by checking the Jira dashboard where I can see what are the task assigned to me and email. After that, I make a task list and on a priority basis, I pick the task and update the status in JIRA. Also, participate in a daily stand-up meeting where I share my status with teammates. In addition, I participate in automation requirement gathering meetings, develop automation framework, execute the automation test suite, and share results with teammates. In addition, I do code reviews mentor my teammates, and resolve team automation challenges.

day to day activities

6. What are the automation challenges you faced?

During Automation most common challenges are:

What to Automate?

Sometimes we don’t have test cases so it’s difficult to figure out which are use cases are the right candidate for Automation.

Right Automation Tool

Lack of the right tool is the biggest problem while automation.  For instance, if the application is developed on Angular/Rect then Cypress will be a better tool than Selenium as it doesn’t have a loading issue. Another example, we have to validate data then backend Automation will be best instead of web automation.

Accurate use of Testing Resource

For Automation engineers, good knowledge of the programming language is required. In conclusion, if automation resources do not have coding knowledge then it will create trouble.

Captcha and OTP

Some applications are intentionally designed accordingly so that they can’t be automated. However, they are protected with Captcha and OTP systems.

automation challenges

7. What Java OOPs concept have you implemented in your framework?

Java is the best OOPs programming language. Moreover, the QA Automation framework utilizes the OOPs concept to build reusable and easily maintainable code.


The mechanism in Java by which one class acquires the properties (instance variables) and functionalities of another class is known as Inheritance.

Therefore, we create a Base Class in the Automation Framework to initialize WebDriver interface, WebDriver waits, Property files, Excels, etc., in the Base Class.

Moreover, we extend the Base Class to other classes such as Tests and Utility classes.

 In other words, here we extend one class (Base Class like WebDriver Interface) into another class (like Tests, Utility Class) is known as Inheritance.


WebDriver itself is an Interface. So based on the above statement WebDriver driver = new FirefoxDriver(); 

we are initializing the Firefox browser using Selenium WebDriver. It means we are creating a reference variable (driver) of the interface (WebDriver) and creating an Object. Here WebDriver is an Interface as mentioned earlier and FirefoxDriver is a class.

Polymorphism: Polymorphism allows us to perform a task in multiple ways. In other words, a combination of overloading and overriding is known as Polymorphism. We will see both overloading and overriding below.


We use Implicit wait in Selenium. The implicit wait is an example of overloading. In Implicit wait, we use different time stamps such as SECONDS, MINUTES, HOURS, etc.,

Action class in TestNG is also an example of overloading.

The assert class in TestNG is also an example of overloading.

A class having multiple methods with the same name but different parameters are called    

Method Overloading

We use a method that was already implemented in another class by changing its parameters. To understand this you need to understand Overriding in Java.

Similarly, declaring a method in child class that is already present in the parent class is called Method Overriding. For instance, getting and navigating methods of different drivers in Selenium 

8. What are Selenium exceptions and how do you handle them?

During web automation with Selenium, some common exceptions are:

I. ElementNotVisibleException: In spite of the element being present in the DOM, it is not visible (can not be interactive). For example, elements defined in HTML with type =” hidden”

II. ElementNotSelectableException: An element is disabled (can not be clicked/selected) in spite of being present in the DOM

III. NoSuchElementException: Webdriver is not able to determine the elements during runtime, i.e., the FindBy method cannot find a particular component

IV. NoSuchFrameException: Webdriver attempts to switch to an invalid frame, which is unavailable

V. NoAlertPresentException: Webdriver is trying to switch to an invalid alert, which is unavailable

VI. NoSuchWindowException: Webdriver is trying to switch to an invalid window, which is unavailable

VII. StaleElementReferenceException: The referenced element is no longer present on the DOM page (a reference to a component is now Stale). For instance, the item belongs to a different frame than the current one, or the user has navigated away to another page

VIII. SessionNotFoundException: Webdriver is acting immediately after ‘quitting’ the browser

IX. TimeoutException: The command did not complete in the specified time. For instance, the element didn’t display at the specified time. This is especially encountered when working with waits

X. WebDriverException: Webdriver is acting immediately after ‘closing’ the browser

9. What do you understand about BDD and why it’s so a popular framework?

Ans: Behavioral Driven Development (BDD) works as a bridge between the Business and Automation team. It gives the detailed implementation of the Automation framework which anyone can understand even without coding knowledge. BDD framework implemented with Cucumber. In conclusion, in BDD, test cases are written into feature files and implementation is done in step definition and runs using Test Runner.

Feature file written in Gherkin language which has to plan English keywords like Given, When and Then, etc.

10. What are Agile Ceremonies?

Ans: Agile team has four meetings Sprint Planning, Daily Stand-Up Meeting, Iterative Review.

In Sprint Planning – Project Owner does meeting with the entire team to prioritize Product Backlogs.

Daily Stand Up – The purpose of the Daily Standup meetings is to track daily status, check blockers and discuss dependency.

Iterative Review – In an iterative meeting show me how and demo happens.

Retrospective Meeting: The purpose of the retrospective meeting is to gather feedback on the sprint. Basically, three questions were asked by every member were “What went well”, “What went wrong” and “what needs to improve” and on the basis of common action points shared to improve sprint.

JAVA Knowledge Questions

11. What is the difference between Abstract Class and Interface class?

But there are many differences between abstract class and interface that are given below.

Abstract classInterface
1) Abstract classes can have abstract and non-abstract methods.The interface can have 100% abstract methods. Since Java 8, it has default and static methods.
2) Abstract class doesn’t support multiple inheritances.The interface supports multiple inheritances. One class can implement multiple interfaces.
3) Abstract class can have final, non-final, static and non-static variables.The interface has only static and final variables.
4) Abstract class can provide the implementation of the interface.Interface can’t provide the implementation of an abstract class.
5) The abstract keyword is used to declare an abstract class.The interface keyword is used to declare the interface.
6) An abstract class can extend another Java class and implement multiple Java interfaces.An interface can extend to another Java interface only.
7) An abstract class can be used with the keyword “extends”.An interface will be implemented using the keyword “implements”.
8) A Java abstract class may have class members like private, protected, etc.Members of a Java interface are public by default.

12. What is the difference between final, finally, and finalize?

 “final” is the access modifiers. The final keyword is applicable to classes, variables, and methods.

“finalize()” method executes before garbage collector. It is applicable to objects.

14. What is the difference between Set and List?

The list allows duplicate elements while Set doesn’t allow duplicate elements.

Selenium Question

15.What is difference between driver.close() and driver quit();

       Ans:  driver. close()  closes the window which has web driver focus.

driver.quit() close all the windows and ends browser session gracefully.

difference between driver.close() and driver quit()

 16. What is the difference between finding elements and findElement?

 In Selenium – findElement returns a single web element within a page while find elements returns a list of elements.

19. What is an iframe and how to switch from one iframe to another?

To perform any action within iframe we need to switch into it i.e set webdriver focus into it.

We can switch within iframe by index, name and id




20.How to handle multiple windows in Selenium WebDriver?

When using multiple windows are open then we can get details of windows by method

get.windowhandle() – get the window handle of Current window


switchTo   this method switch between windows

21. What is the difference between Action and Actions in Selenium?

Action is an interface to perform a single action with perform() While Actions is the class in selenium that implements builder pattern to perform complex composite actions.

22. What is Javascript Executor and how do you run it?

Javascript executor is an interface that provides a mechanism to execute the script and execute async script methods. Moreover, to run Javascript execute we need to make the object of JavascriptExecutor, and using object we can execute javascript :

JavascriptExecutor js = (JavascriptExecutor)driver;
js.executeScript("arguments[0].click();", element);

23. What is the difference between Scenario and Scenario Outline?

Keyword “Scenario” applies when feature files need to run on one set of data while the keyword “Scenario Outline” is to run the same scenario over different data.

24. What is Hooks and what is their use in Cucumber?

Cucumber provides Hooks which are blocks of code that run before and after each scenario. Moreover, we can write anywhere in our project using annotations @Before and @After. In other words, it helps us to reduce code redundancy and accordingly manage the workflow

Usually, in the @Before block, we write code to

  • Start webdriver
  • For DB Connection
  • For server connection
  • Generate Test data and clean up

While in @After block we write code for

  • Close webdriver
  • Close DB connections
  • Close server connection
  • Take a screenshot of the error
  • Printing reports on error log

 25. Why do we write “Background” in Cucumber?

To perform common steps before every test. Therefore, it provides some context to Scenarios.

SQL Questions

26. Could you please explain your SQL knowledge?

Being part of the Testing Team, all things considered, I get many test cases that have SQL validation and some procedure need to run validate reports. So I am good at querying data using SQL queries, writing SQL scripts to create, update tables, create views and writing joins

27. Could you pls write a query to find the third-highest Salary of an employee from the Employee table?

First Way – using the top query

SELECT TOP 1 salary 
    (SELECT TOP 3 salary 
     FROM Table_Name 
     ORDER BY salary DESC) AS Comp 

Using Subquery

SELECT salary  
    (SELECT salary 
     FROM Table_Name 
     ORDER BY salary DESC 
     LIMIT 3) AS Comp 
ORDER BY salary 


SELECT * FROM `employee` ORDER BY `salary` DESC LIMIT 1 OFFSET 2;
  • Could write SQL query to create TABLE;
Colum1 datatype;
Column2 datatype;
Column datatype;

For more practice, please use the below link: 


28. What is API Testing and could you please highlight your work?

API stands for Application Programming Interface which is the middle layer between frontend and database. In other words, all in all, API enables the communication and data exchange between one software to another Software.

Although, in API Testing we test API functionality, reliability, performance, and security. To test API,  I used POSTMAN, SOAP UI, and Rest Assured.

29. What are the benefits of API Testing?

There are several advantages of API Testing:

  • Firstly, Language-Independent – Data transfer happens in JSON and XML so it uses any language for validation.
  • secondly, GUI independent: Every testing gives the right feedback and updates accordingly.
  • Lastly, Faster – API Testing is extremely faster as compared to GUI testing.

31. What is Jenkins and what is its use?

Jenkins is an open-source automation server in Java. Jenkins used to build, test and deploy software. As a result, using Jenkins we execute a series of actions to achieve continuous integration.

  • Firstly, build Software based on Maven, Gradle, and more
  • Secondly, automated tests based on Testng, Pytest, Cypress, etc
  • Most importantly, achieve Test Results perform test actions, and display another result and email notification

32. How to create Jenkins Jobs?


Step i) Login to Jenkins>Click on Create New Item>Enter Item details>Enter Project details>Tweak the settings

a) . Click on “Add build step”

b). Click on “Execute Windows batch command” and add the commands you want to execute during the build process.

Step ii) Save the project

After entering all the required fields:

Click Apply

Save the project.

Step iii) After that, build Source code, Check the status, and see the console output



In conclusion, the above-discussed test automation interview questions experience will surely help you in your job interview. Lastly and most importantly, if you have any questions or want additional support in test automation interview questions then call us on +919555902032 or write at info@thoughtcoders.com

Write A Comment