Automation Test Engineer Interview Questions & Answers
40 questions for Automation Test Engineer interviews — 2 easy, 36 medium, 2 hard.
About the Automation Test Engineer role
Builds and maintains automated UI and API tests in Java, usually with Selenium, TestNG and REST Assured, and runs them through Maven and Jenkins. Works with developers and manual testers to pick what to automate and keeps the suite stable. Interviews test core Java, locators and waits, TestNG features, a simple REST Assured test and how you debug failures in CI.
How do you build dynamic JSON request bodies without hard-coded strings?
Show answer
What is a DataProvider in TestNG?
Show answer
How do you share state between step definition classes in Cucumber Java?
Show answer
How have you handled disagreement with a developer about whether something is a bug?
Show answer
How do you handle a test that is flaky only in headless mode?
Show answer
What is a constructor and can it be overloaded?
Show answer
How do you upload a file with Selenium?
Show answer
What are filters in REST Assured?
Show answer
An API returns 200 but your REST Assured assertion on a field fails with a null value. How do you debug it?
Show answer
How do you measure and assert API response time in REST Assured?
Show answer
How do you upload a file with REST Assured?
Show answer
How do you group tests?
Show answer
Write a TestNG listener that logs test start and failure.
Show answer
What is the use of the this and super keywords?
Show answer
How do you pass authentication in an API test?
Show answer
What is the Optional class in Java and where is it useful in test code?
Show answer
How do you handle authentication types in REST Assured?
Show answer
What is polymorphism and how does it show up in Selenium?
Show answer
A dropdown option list loads only after typing three letters. How do you automate selecting a value?
Show answer
What are relative locators in Selenium 4?
Show answer
What is git cherry-pick?
Show answer
How do you run tests in parallel?
Show answer
What is the @Factory annotation in TestNG?
Show answer
Where do you use OOP concepts in your framework?
Show answer
Why do Selenium browser containers need a larger shm_size?
Show answer
What is the difference between ThreadLocal and a synchronized block in Java?
Show answer
How does HashMap work internally?
Show answer
What is the difference between Comparable and Comparator in Java?
Show answer
How do you verify that an element is displayed, enabled or selected?
Show answer
Your Selenium tests in CI produce blank screenshots in headless mode. What could be wrong?
Show answer
POST vs PUT vs PATCH?
Show answer
How do you handle waits inside page objects?
Show answer
How do you validate a JSON response in REST Assured?
Show answer
Which reporting tools do you use?
Show answer
Describe a time you improved the maintainability of an automation framework.
Show answer
How do you validate an XML response in REST Assured?
Show answer
How do you retry failed tests in TestNG?
Show answer
What is method overriding and where is it useful in frameworks?
Show answer
What are try-with-resources and why use them?
Show answer
Frequently asked questions
What does a Automation Test Engineer do?
Builds and maintains automated UI and API tests in Java, usually with Selenium, TestNG and REST Assured, and runs them through Maven and Jenkins. Works with developers and manual testers to pick what to automate and keeps the suite stable. Interviews test core Java, locators and waits, TestNG features, a simple REST Assured test and how you debug failures in CI.
Which skills are tested in a Automation Test Engineer interview?
Expect questions on Selenium WebDriver, Core Java, TestNG, REST Assured, Maven and Jenkins. Most rounds also ask you to explain a project and solve one practical problem live.
How do I prepare for a Automation Test Engineer interview?
Revise Selenium WebDriver, Core Java for Testers, TestNG Framework, REST Assured first using the topic sheets, practise the questions on this page aloud, then do one full mock interview to practise timing.