Qa Automation Testing Engineer

100+ Qa Automation Testing Engineer Interview Questions and Answers

Updated 12 Feb 2025

Q51. how do you handle upload pop up in selenium?

Ans.

Handle upload pop up in Selenium by using sendKeys method to upload file

  • Use sendKeys method to send file path to the upload input field

  • Make sure to handle any pop-ups that may appear during the upload process

  • Verify the successful upload by checking for any success messages or elements on the page

Q52. Write a program in java to get the count of duplicate char in string

Ans.

Program in Java to count duplicate characters in a string

  • Create a HashMap to store characters and their counts

  • Iterate through the string and update the counts in the HashMap

  • Finally, iterate through the HashMap and count characters with count > 1

Q53. What is STP and how it will work?

Ans.

STP stands for Software Test Plan. It is a document that outlines the testing strategy, objectives, resources, and schedule for a software testing project.

  • STP defines the scope, approach, resources, and schedule of testing activities.

  • It helps in identifying the test environment, test deliverables, and test execution schedule.

  • STP also includes the roles and responsibilities of the testing team members.

  • It serves as a roadmap for the testing process and ensures that all necessar...read more

Q54. What is TCP/UDP and how it will work?

Ans.

TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) are two different protocols used for data transmission over networks.

  • TCP is a connection-oriented protocol that ensures reliable and ordered delivery of data packets.

  • UDP is a connectionless protocol that does not guarantee delivery or order of packets.

  • TCP uses handshaking to establish a connection between sender and receiver before data transfer.

  • UDP is faster and more efficient for real-time applications lik...read more

Are these interview questions helpful?

Q55. Difference between parallel methods and parallel tests

Ans.

Parallel methods run multiple methods concurrently within a single test, while parallel tests run multiple tests concurrently.

  • Parallel methods execute multiple methods within a single test class concurrently.

  • Parallel tests execute multiple test classes concurrently.

  • Parallel methods are useful for speeding up the execution of a single test, while parallel tests are useful for running multiple tests faster.

  • Example: Running login and logout methods concurrently within a single t...read more

Q56. Explain framework, collection interface and programming around it, testng, cucumber, rest assured

Ans.

Framework is a structure that provides guidelines for automation testing. Collection interface is a set of classes and interfaces for storing and manipulating data. TestNG, Cucumber, and Rest Assured are popular tools for automation testing.

  • Framework is a reusable set of guidelines, coding standards, concepts, and practices that provide structure for automation testing.

  • Collection interface in Java is a framework that provides a standard way to store and manipulate groups of o...read more

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Q57. WAP to swap the two integer without using third variable.

Ans.

Swapping two integers without using a third variable in a programming language.

  • Use bitwise XOR operation to swap two integers without using a third variable.

  • Example: int a = 5, b = 10; a = a ^ b; b = a ^ b; a = a ^ b; // Now a = 10, b = 5

Q58. Write one step definition by seeing the feature file.

Ans.

The step definition should match the steps in the feature file for automation testing.

  • Read the step from the feature file

  • Create a corresponding step definition in the automation testing framework

  • Ensure the step definition accurately performs the desired action

Qa Automation Testing Engineer Jobs

Qa Automation Testing Engineer- Java script 6-8 years
Luxoft
3.7
₹ 10 L/yr - ₹ 15 L/yr
Chennai
Qa Automation Testing Engineer 4-9 years
Mindsprint
3.8
Chennai
QA Automation Testing Engineer 4-6 years
Cerulean Information Technology
4.8
₹ 6 L/yr - ₹ 12 L/yr
Bangalore / Bengaluru

Q59. What is DHCP? Explain in Detail?

Ans.

DHCP stands for Dynamic Host Configuration Protocol, used to automatically assign IP addresses to devices on a network.

  • DHCP is a network protocol that allows a server to automatically assign IP addresses to devices on a network.

  • It helps in reducing the manual effort required to configure IP addresses for each device.

  • DHCP servers maintain a pool of IP addresses and lease them to devices for a specific period of time.

  • Devices send a DHCP request to the server when they connect t...read more

Q60. What is constructor in Java?

Ans.

Constructor in Java is a special type of method that is used to initialize objects.

  • Constructors have the same name as the class they are in.

  • They do not have a return type, not even void.

  • They are called when an object of a class is created.

  • Constructors can be overloaded, meaning a class can have multiple constructors with different parameters.

  • Example: public class Car { public Car() { // default constructor } public Car(String model) { // parameterized constructor }}

Q61. 6-API testing various response codes

Ans.

API testing involves checking various response codes to ensure the API functions correctly.

  • Test for common response codes like 200 (OK), 400 (Bad Request), 401 (Unauthorized), 404 (Not Found), 500 (Internal Server Error)

  • Verify the response code matches the expected result based on the API request

  • Use tools like Postman or RestAssured to automate API testing and check response codes

  • Check for edge cases where the API may return unexpected response codes

Q62. How to create job for CI/CD in jenkins.

Ans.

To create a job for CI/CD in Jenkins, you can use the Jenkins interface to configure a new job with the necessary build and deployment steps.

  • Navigate to Jenkins dashboard and click on 'New Item' to create a new job

  • Select the type of job you want to create (Freestyle project, Pipeline, etc.)

  • Configure the job settings such as source code repository, build triggers, build steps, and post-build actions

  • Set up the job to be triggered automatically by changes in the source code repo...read more

Q63. What is the different types of frameworks selenium

Ans.

Selenium frameworks include Data-Driven, Keyword-Driven, Hybrid, Page Object Model, and Behavior-Driven Development.

  • Data-Driven Framework: Tests are driven by external data sources like Excel sheets or databases.

  • Keyword-Driven Framework: Tests are written using keywords and actions.

  • Hybrid Framework: Combination of Data-Driven and Keyword-Driven frameworks.

  • Page Object Model: Each web page is represented as a class, making tests more maintainable.

  • Behavior-Driven Development (BD...read more

Q64. Is Cucumber Data Driven Framework?

Ans.

Yes, Cucumber is a Data Driven Framework.

  • Cucumber allows for writing test cases in plain English using Gherkin syntax

  • Data can be stored in external files like Excel, CSV, or JSON and easily integrated into test scripts

  • Scenarios can be parameterized to run with different test data sets

Q65. Select an element from drop down

Ans.

To select an element from a drop down, locate the drop down element and use the select class in Selenium.

  • Locate the drop down element using findElement() method

  • Create an object of Select class using the drop down element

  • Use selectByVisibleText(), selectByValue() or selectByIndex() method to select the desired option

Q66. What are the Response codes of API

Ans.

Response codes of API are standardized status codes returned by a server in response to a client's request.

  • 200 - OK: Request was successful

  • 400 - Bad Request: Invalid input or missing parameters

  • 401 - Unauthorized: Authentication required

  • 404 - Not Found: Resource not found

  • 500 - Internal Server Error: Server-side issue

Q67. What is API Testing and its purpose

Ans.

API Testing is testing the application programming interface to ensure it meets functionality, reliability, performance, and security requirements.

  • API Testing involves testing the communication between different software systems through APIs.

  • It ensures that the API functions correctly, returns the expected results, and handles errors gracefully.

  • API Testing can be done at different levels such as unit testing, integration testing, and end-to-end testing.

  • Tools like Postman, Soa...read more

Q68. Write the code for Parallel testing in TestNG

Ans.

Parallel testing in TestNG allows running tests concurrently for faster execution.

  • Use 'parallel' attribute in testng.xml file to specify parallel execution mode.

  • Set 'parallel' attribute to 'methods', 'classes', or 'tests' based on the level of parallelism needed.

  • Example: <suite name='MySuite' parallel='tests'>

  • Use 'thread-count' attribute to specify the number of threads to use for parallel execution.

Q69. Program to print average of number series

Ans.

Program to print average of number series

  • Create a variable to store the sum of the numbers in the series

  • Create a variable to store the count of numbers in the series

  • Loop through the series and add each number to the sum variable

  • Increment the count variable for each number in the series

  • Calculate the average by dividing the sum by the count

  • Print the average

Q70. Write a program to print Fibonacci series

Ans.

Program to print Fibonacci series

  • Declare two variables to store the first two numbers of the series

  • Use a loop to generate the next numbers in the series

  • Print each number as it is generated

Q71. Input string str= " Name SIRNAME" EXPECTED OUTPUT "Name Sirname"

Ans.

The expected output is to capitalize the first letter of each word in the input string.

  • Split the input string by space to get individual words

  • Capitalize the first letter of each word

  • Join the words back together with a space in between

Q72. Explain Agile and agile scrum ceremony

Ans.

Agile is a methodology that emphasizes flexibility and collaboration. Agile Scrum is a framework for implementing Agile.

  • Agile focuses on delivering working software in short iterations

  • Agile values individuals and interactions over processes and tools

  • Agile encourages customer collaboration and responding to change

  • Agile Scrum includes ceremonies such as Sprint Planning, Daily Stand-up, Sprint Review, and Sprint Retrospective

  • Sprint Planning involves the team planning the work to...read more

Q73. what is SOLID principles?

Ans.

SOLID principles are a set of five design principles that help in creating maintainable and scalable software applications.

  • SOLID stands for Single Responsibility, Open-Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion principles.

  • Single Responsibility Principle (SRP) states that a class should have only one reason to change.

  • Open-Closed Principle (OCP) states that a class should be open for extension but closed for modification.

  • Liskov Substitution Pri...read more

Q74. cypress folder structure and and its assertions

Ans.

Cypress folder structure and its assertions

  • Cypress follows a specific folder structure for organizing test files

  • The 'fixtures' folder contains static data used in tests

  • The 'integration' folder contains the actual test files

  • The 'plugins' folder contains custom plugins and tasks

  • The 'support' folder contains reusable functions and commands

  • Cypress provides various assertions for validating test results

  • Common assertions include 'should', 'expect', and 'assert'

  • Assertions can be use...read more

Q75. Difference between hash map and hash table

Ans.

HashMap is non-synchronized and allows null values and keys, while HashTable is synchronized and does not allow null values or keys.

  • HashMap is non-synchronized and not thread-safe, while HashTable is synchronized and thread-safe.

  • HashMap allows null values and keys, while HashTable does not allow null values or keys.

  • HashMap is generally preferred over HashTable for non-thread-safe operations due to better performance.

Q76. What is boundary value analysis.

Ans.

Boundary value analysis is a software testing technique used to identify errors at boundaries of input ranges.

  • Focuses on testing at the boundaries of input ranges

  • Helps identify errors that occur at the boundaries

  • Tests values at the lower and upper limits of valid ranges

  • Reduces the number of test cases needed for thorough testing

Q77. Write feature file for given requirements

Ans.

Create a feature file based on given requirements

  • Define the feature and scenario

  • List out the steps for the scenario

  • Include any necessary data tables or examples

Q78. What can you tell me about automation?

Ans.

Automation refers to the use of technology to perform tasks with minimal human intervention.

  • Automation involves using software tools to execute test cases and verify expected outcomes.

  • It helps in reducing manual effort, increasing test coverage, and improving efficiency.

  • Examples of automation tools include Selenium, Appium, and JUnit.

Q79. What is TestNG?

Ans.

TestNG is a testing framework designed to simplify a broad range of testing needs, from unit testing to integration testing.

  • TestNG allows for easy configuration of test cases using annotations.

  • It supports parallel execution of test methods.

  • TestNG provides features like data-driven testing, parameterization, and grouping of test methods.

  • It generates detailed test reports for analysis.

  • TestNG integrates seamlessly with tools like Maven and Jenkins.

Q80. Difference between scenario and scenario outline

Ans.

Scenario is used to define a single test case, while scenario outline is used to define multiple test cases using a template.

  • Scenario is used for a single test case, while scenario outline is used for multiple test cases.

  • Scenario outline uses placeholders (example: ) to create multiple variations of the same test case.

  • Scenario outline is useful when testing the same functionality with different input data.

  • Example: Scenario - Login with valid credentials. Scenario Outline - Lo...read more

Q81. sum of all positive integers from an array

Ans.

Sum all positive integers from an array of strings.

  • Convert each string to integer and check if it is positive

  • Add all positive integers together to get the sum

Q82. How to handle the scroll handing

Ans.

Scroll handling in automation testing involves using methods to interact with scroll bars and elements on a webpage.

  • Use methods like scrollToElement() to scroll to a specific element on the page

  • Use actions class in Selenium to perform scroll actions like scrolling up, down, left, or right

  • Handle dynamic loading of elements by scrolling to the bottom of the page to trigger the loading of more content

  • Use JavaScriptExecutor to scroll to a specific position on the page

Q83. what is compile time polymorphism

Ans.

Compile time polymorphism is the ability of a programming language to select which method to execute at compile time based on the method signature.

  • Compile time polymorphism is achieved through method overloading and operator overloading.

  • Method overloading allows multiple methods in the same class with the same name but different parameters.

  • The compiler determines which method to call based on the number and type of arguments passed.

  • Example: void add(int a, int b) and void add...read more

Q84. How to handle conflicts in git

Ans.

Conflicts in git can be handled by resolving them through merging, rebasing, or using tools like git mergetool.

  • Communicate with team members to understand changes causing conflicts

  • Resolve conflicts by manually editing files or using git mergetool

  • Use git rebase to reapply changes on top of another branch

  • Merge conflicting branches after resolving conflicts

Q85. Program to count the occurrence of vowels

Ans.

Program to count the occurrence of vowels in an array of strings

  • Iterate through each string in the array

  • For each string, iterate through each character and check if it is a vowel (a, e, i, o, u)

  • Increment a counter for each vowel found in the string

  • Repeat for all strings in the array and return the total count of vowels

Q86. Code to give addition of multi dimensional array

Ans.

Code to add elements of a multi-dimensional array

  • Iterate through each element of the array and add them together

  • Use nested loops to access each element in the multi-dimensional array

  • Keep a running total of the sum as you iterate through the array

Q87. Explain me Layer2 and Layer3 in detail

Ans.

Layer2 and Layer3 are network layers in the OSI model, responsible for data transmission and routing.

  • Layer2 (Data Link Layer) operates at the MAC address level, handling physical addressing and error detection.

  • Layer3 (Network Layer) operates at the IP address level, handling routing and logical addressing.

  • Layer2 switches operate at Layer2, while routers operate at Layer3.

  • Examples of Layer2 protocols include Ethernet and Wi-Fi, while Layer3 protocols include IP and ICMP.

Q88. Difference between static and non static

Ans.

Static variables belong to the class itself, while non-static variables belong to instances of the class.

  • Static variables are shared among all instances of a class

  • Non-static variables are unique to each instance of a class

  • Static variables are initialized only once, at the start of the program

  • Non-static variables are initialized separately for each instance of the class

Q89. Disadvantages of static and non static

Ans.

Static and non-static have their own disadvantages in QA automation testing.

  • Static methods cannot be overridden or inherited, making it difficult to create flexible test cases.

  • Non-static methods require an instance of the class to be created, which can lead to increased memory usage.

  • Static methods can lead to tight coupling between classes, making it harder to maintain and update the code.

  • Non-static methods may have dependencies on other parts of the code, making them harder ...read more

Q90. Parameter for post method in postman

Ans.

The parameter for a POST method in Postman is typically sent in the request body.

  • Parameters are sent in the request body in key-value pairs

  • Parameters can be sent as form-data, x-www-form-urlencoded, or raw JSON

  • Example: {"key": "value"}

Q91. Find the second maximum number in an array

Ans.

Find the second maximum number in an array

  • Sort the array in descending order

  • Return the element at index 1

Q92. Write a xpath on the traversing xpath.

Ans.

Traversing XPath is used to navigate through the elements in a structured way.

  • Use '//' to select all elements in the document, regardless of their location

  • Use '/' to select direct child elements

  • Use '[@attribute='value']' to select elements based on their attribute value

  • Use 'following-sibling::' to select siblings that come after the current element

  • Use 'preceding-sibling::' to select siblings that come before the current element

Q93. Program to print sum of 2 numbers

Ans.

Program to print sum of 2 numbers

  • Declare 2 variables to store the numbers

  • Add the variables and store the result in another variable

  • Print the result

Q94. Input str = "Name Sirname" Output "Sirname Name"

Ans.

Reverse the order of words in a given string.

  • Split the input string by space to get individual words

  • Reverse the array of words

  • Join the words back together with a space in between

Q95. Reverse the characters of words in the string

Ans.

Reverse the characters of words in a string

  • Split the string into an array of words

  • Reverse each word in the array

  • Join the reversed words back into a single string

Q96. What is retry logic in testng

Ans.

Retry logic in TestNG allows for re-execution of failed test cases to improve test reliability.

  • Retry logic can be implemented using the 'retryAnalyzer' attribute in TestNG annotations.

  • It allows for setting a maximum number of retry attempts for failed test cases.

  • Failed test cases are re-executed based on the specified retry count.

  • Retry logic helps in improving test reliability by handling intermittent failures.

Q97. What is polymorphism ?

Ans.

Polymorphism is the ability of a single function or method to operate on different types of data.

  • Polymorphism allows objects of different classes to be treated as objects of a common superclass.

  • There are two types of polymorphism: compile-time (method overloading) and runtime (method overriding).

  • Example: Inheritance in object-oriented programming languages like Java allows for polymorphism.

Frequently asked in, ,

Q98. Where you initialise driver

Ans.

The driver is typically initialized in the setup method of a test automation framework.

  • Driver initialization is usually done in a setup method before test execution.

  • Commonly used methods for driver initialization include WebDriverManager, System.setProperty, and driver instantiation.

  • Example: WebDriverManager.chromedriver().setup();

Q99. Anagram qn without using any inbuilt fns

Ans.

Anagram question solved without using any inbuilt functions

  • Create a function to check if two strings are anagrams by comparing the frequency of characters

  • Iterate through both strings and count the frequency of each character

  • Compare the frequency of characters in both strings to determine if they are anagrams

Q100. Pillars of JAVA and explain with example

Ans.

The pillars of JAVA are Inheritance, Encapsulation, Polymorphism, and Abstraction.

  • Inheritance: Allows a class to inherit properties and behavior from another class. Example: class Dog extends Animal.

  • Encapsulation: Bundling data and methods that operate on the data into a single unit. Example: private variables with public getter and setter methods.

  • Polymorphism: Ability of a method to do different things based on the object it is acting upon. Example: method overloading and ov...read more

Previous
1
2
3
4
Next
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Interview experiences of popular companies

3.7
 • 10.5k Interviews
3.8
 • 8.2k Interviews
3.6
 • 7.6k Interviews
3.7
 • 5.6k Interviews
3.7
 • 5.6k Interviews
3.7
 • 4.8k Interviews
3.5
 • 3.8k Interviews
3.8
 • 2.9k Interviews
4.0
 • 2.3k Interviews
View all

Calculate your in-hand salary

Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary

Qa Automation Testing Engineer Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter