[Ultimate Collection 2]- QA Automation Interview Questions with Answers

6 Years Experienced QA Automation Engineer Interview Experience

ThoughtCoders committed to support job seekers and guide our trainees to crack job interview. In this series today we are publishing one of the best interview experience. Senior QA Interview can be divided into four section. First part is Automation framework knowledge , second part is functional testing, third part is API Testing, Performance and fourth part SQL knowledge evaluated. Here is the ultimate Senior QA Automation Engineer 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 and 2 Years of experience in Function Testing. I am experienced in Automation framework development, framework maintenance and automation script writing. I am well versed in Selenium, Java, Cucumber, JDBC, Backend Automation, API Testing, Rest Assured, SQL, POSTMAN, Junit, Testng, Devops, Agile and Functional Testing.  Also, I have experience on Regression, Integration, System and Performance Testing.

2. Could you please explain you automation framework?

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

In this framework, few more packages are also there one is Page package, Utilities Package, ListnerersPackage. InPage package have page classes. Each web page hv separate page class where web elements stored.

In Utilities package, 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?

Extent Report is used in my current framework and it is customized with WebDriver Event listeners. It captures test failures, log, screenshot on test failure.

4. Could you please explain your projects completed?

XYZ Bank- In XYZ Bank, I worked on web based trading platform. Using this platform user can buy share and sell. In this project, I have automated the regression test cases using Selenium WebDriver, Java, Cucumber and JUnit. My responsibility to write new automation script, maintain automation framework  and execute automation test suite and share automation result with Stake holders.

XYZ Health System: I worked on one CRM Portal which is used to track customer health enquiries, their policy status, plan details, payment status, settlement and reconciliation. I have developed an automation framework from scratch which was developed using Selenium and Rest Assured. 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. In this project, I worked on JMeter, Postman, Soap UI. Wrote SQL queries to fetch reporeports measured performance. 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 on various load.

XYFG  Bank : In  XYFG  bank, I worked as QA Automation engineer where I built 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. My additional responsibilities were bug reporting, follow up with developer using JIRA, Integration Testing, Regression Testing and post drop validation.

5. What’s you day to day job activities?

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

6. What are the automation challenges you faced ?

During Automation most common challenges are:

What to Automate? – Sometimes we don’t hv test cases so it’s difficult to figure out which are use cases are right candidate for Automation.

Right Automation Tool: Lack of right tool is biggest problem while automation.  For example if application is developed on Angular/Rect then Cypress will be the better tool than Selenium as it doesn’t have 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 engineer good knowledge on programming language required. If automation resources hv not coding knowledge then it will create trouble.

Captcha and OTP : Some application intentionally designed in a way so that it can’t be automate. They are protected with Captcha and OTP systems.

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

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

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

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

We extend the Base Class in other classes such as Tests and Utility Class.

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

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

we are initializing 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. Combination of overloading and overriding is known as Polymorphism. We will see both overloading and overriding below.

 METHOD OVERLOADING

We use Implicit wait in Selenium. 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.

Assert class in TestNG is also an example of overloading.

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

Method Overloading

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

Declaring a method in child class which is already present in the parent class is called Method Overriding. Examples are get and navigate methods of different drivers in Selenium 

8. What are Selenium exceptions and how you handle it?

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 example, 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 example, 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 by BDD and why it’s so popular framework?

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

Feature file written in Gherkin language which have 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 entire team to prioritize Product Backlogs.

Daily Stand Up – Purpose of Daily Standup meeting is to track daily status, check blocker and discuss dependency.

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

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

JAVA Knowledge Questions

11. What is 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 class can have abstract and non-abstract methods.Interface can have 100% abstract methods. Since Java 8, it have default and static methods.
2) Abstract class doesn’t support multiple inheritances.Interface supports multiple inheritances. One class can implement multiple interfaces.
3) Abstract class can have final, non-final, static and non-static variables.Interface has only static and final variables.
4) Abstract class can provide the implementation of interface.Interface can’t provide the implementation of abstract class.
5) The abstract keyword is used to declare abstract class.The interface keyword is used to declare interface.
6) An abstract class can extend another Java class and implement multiple Java interfaces.An interface can extend another Java interface only.
7) An abstract class can be used with keyword “extends”.An interface will be implemented using 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 difference between final, finally and finalize?

 “final” is the access modifiers. Final keyword is applicable to classes, variable and methods. Once class is final it cant be extended , once variable is final then it’s value cant changed.

“finally” is block which is always associated with try catch block. Finally block executes after try and catch block.

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

13. What is the difference between “throw” and “throws” in Java ?

 “throw” is the keyword used to throw exception exciplity within code while “throws” keywords used in method signature to declare the exception. Multiple exceptions can be declared with method signature.

14. What is difference between Set and List?

List is used to order sequence while set is used to unordered sequence. List allow duplicate elements while Set doesn’t allow duplicate element.

Selenium Question

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

       Ans :  driver.close()  closes the window which have webdriver focus.

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

 16. What is difference between findElements and findElement ?

 In Selenium – findElement returns single webelement within page while findElements returns list of elements.

17. What is difference between Assert and Verify?

In the case of assertions, if the assert condition is not met, test case execution will be aborted. The remaining tests are skipped, and the test case is marked as failed. These assertions are used as checkpoints for testing or validating business-critical transactions.

 In case of verify, tests will continue to run until the last test is executed even if assert conditions are not met. Verify or Soft Asserts will report the errors at the end of the test. Simply put, tests will not be aborted if any condition is not met. Testers need to invoke the assertAll() method to view the results.

18. What is desired capabilities and why it is used ?

Desired Capabilities is a class in Selenium which is used to configure browser properties like window size, version, accept insecureCerts, enable javascript set browsername and set browser version

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

Iframe is basically html page which is embedded within another html page. 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

  • driver.switchTo().frame(0);
  • driver.switchTo().frame(“iframeName”);
  • driver.switchTo().frame(“iframeid”);
  • 20.How to handle multiple windows in Selenium WebDriver?

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

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

get.windowhandles()- Methods returns the all handles opened

switchTo   this method switch between windows

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

Action is interface which is used to perform single action. It used with perform() While Actions is the class in selenium which implements builder pattern and it used to perform complex composite actions.

22. What is Javascript Executor and how you run ?

Javascript executor is interface that provide mechanism to executescript and execute async script methods. To run Javascript execute we need to make 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” is used when feature file need to run on one set of data while keyword “Scenario Outline” is used to run the same scenario over different data. Data mentioned in example sections.

24. What is Hooks and why it is used in Cucumber?

Cucumber provides Hooks which are block of code which run before and after each scenario. We can write anywhere in our project using annotations @Before and @After. It help us to reduce code redundancy and mange workflow

Usually, in @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
  • Taking screenshot on error
  • Printing reports on error log

 25. Why we wrote “Background” in Cucumber?

Background is used to perform common steps before every test. It provide some context to Scenarios.

SQL Questions

26. Could you please explain your SQL knowledge?

Being the part of Testing Team, I get many test cases which hv SQL validation and some procedure need to run validate reports. So I am good querying data using SQL query, write SQL script to create, update table, create view and write joins

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

First Way – using top query

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

Using Sub query

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

Using OFFSET

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

For more practice, please use below link: 

https://www.w3schools.com/sql/default.asp

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. API enables the communication and data exchange between one software to another Software.

In API Testing we test API functionality, reliability, performance and security. To test API,  I used POSTMAN, SOAP UI, and Rest Assured. I am well versed in POSTMAN script writing and integration with NEWMAN.

29. What are the benefits of API Testing?

There are several advantages of API Testing:

  • Language Independent – Data transfer happens in JSON and XML so any language can be used for validation.
  • GUI independent: GUI is not required for API testing. Every testing gives right feedback and accordingly updated.
  • Faster – API Testing is extremely faster as compared to GUI testing.

31. What is Jenkins and why it is used?

Jenkins is open source automation server which built in Java. Jenkins used to build, test and deploy software. Using Jenkins we execute a series of actions to achieve continuous integration.

  • Build Software based on Maven, Gradle and more
  • Automate test based on Testng, Pytest, Cypress etc
  • Achieve Test Results and perform test actions and display results and email notification

32. How to create Jenkins Jobs?

Ans:

Step i) Login to Jenkins

Step ii) Click on Create New Item

Step iii) Enter Item details

Step iv ) Enter Project details

Step v) 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 7) Save the project

After entering the all the required fields:

Click Apply

Save the project.

Step 8) Build Source code

Step 9) Check the status

Step 10) See the console output

https://thoughtcoders.com/create-first-jenkins-job-for-automation-test/

33. Why you want to join this job? or Why we should hire you?

As I went through Job description and found that my profile is perfectly matching with job description. I have proven experience on Framework development, maintenance, team leading and POC and am well versed in Java, Javascript, Blackened Automation and DEVOPS skills so I am confident to put my contribution in organization growth and ready to accept new challenges.

Hope the above interview experience helps in your job interview. Still if you have any questions or want additional support then call us on +919555902032 or write at info@thoughtcoders.com

To learn more about testing, automation tools (Cypress, Selenium, RestAssured, etc), and QA tools explore ThoughtCoders blogs section. You may also Contact Us for QA Services, QA Automation, Software Testing, Performance Testing, Interview, and Job Support Software Training, Automation Testing Trainings, and technical consolations.

0 0 vote
Article Rating
close

Subscribe to our Newsletter:

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
Open chat
Feel free to contact