Test Automation Interview questions and answers
Here I am listing down Test automation interview questions with answers explaining the concepts as well to understand the real time scenarios.
Before Jumping on to Interview questions Lets see What is Test Automation?
Automation testing is a process of using software to perform testing with or without human intervention. as we develop the test automation once, these can be repeated which results in accuracy and consistency. and also saves cost and time.
Automation testing plays a very crucial role in the software development process of continuous testing and continuous delivery. as software is updated and changed more often its important to test the system quickly and its more efficient when the tests are automated.
1. Why and when do you go for test automation?
Why –
Saves effort and time
Test execution is consistent
Provides quick feedback
When –
Decision of automating is dependent on ROI. ROI Is nothing but when do you see the benefit of automation (time and cost save) for th effort that you put on for developing automation
2. Is there any situation that you don’t do automation
When Application is not stable and expected to change
It’s Impractical to automate all forms of testing. like usability testing, accessibility testing and also user interface testing on look and feel. These validations should be carried out by human.
And also Exploratory/Adhoc tests can’t be automated.
3. What tests do you automate?
- Regression tests
- Smoke and Sanity tests
- Tests that need to run on multiple browsers
- Tests that need to run on multiple devices or operating systems
- Test that need to run for multiple test data
4. What are the different types of testing that can be automated?
- Unit testing
- Integration testing
- Sanity & Smoke testing
- Regression testing
- Functionality testing
- Performance testing
5. What are the steps involved in test automation?
These are the aspects that we need to understand and evaluate when setting up test automation
- Finding the scope for test automation
- Identifying automation tool
- Listing down the infrastructure, plan and design
- Planning, design and development
- Identifying test data requirements and strategy to create
- Create base project structure and develop common utilities (like Log verification, db interaction, driver or rest specification instantiation, report verification etc)
- Local setup for development – Defining What softwares to use, how to schedule tests and how to bring up applications under test
- Listing down integration points
- Defining the branching strategy
- CI implementation
- Define best practices/ processes (like coding practices, reviews)
- Planning for training needs if any
- Maintenance
6. How to select the right automation tool.
Consider the following things wile selecting tool
- Budget available – based on this you know if you can go for paid tools or open source free tool.
- Support for Types of testing – list down the tools which supports, like some tools support UI automation some supports only mobile. Like that.
- Integration – Evaluate what support tool provides for features like test scheduling, logging, report generation, integration with CI tools like Jenkins, GitHub and integration with project management tools like JIRA, XRay etc.
- Identify few scenarios which covers different tests like PDF verification, image verification, in case of UI different ui elements like table button etc and see if tool is capable of automating these verifications.
- Support – Tool should have good customer support and community support like online forums, online tutorials and knowledge base.
- Last but not least, skillset available in the team and what kind of training that needs to be planned and if it is feasible considering budget and time.
7. How do you ensure scalability and maintainability of test automation
- Framework should be modular, develop reusable components
- Framework should be configurable with different data for different environments
- Define best practices, coding standards and naming conventions
- Create a core library and encourage moving common code to that
- Mandatory review by a senior in the team
- Define strategy for test data
- It should be configurable for different data or for environments
- Define best practices and code standards, naming conventions
- Create a core library and encourage moving common code to that
- Identify appropriate design patterns. Like Page object model, Singleton, Façade, Builder pattern etc.
- Mandatory review by a senior in the team
- Good Documentation and training on what is available in framework and how to use
8. What is test automation framework?
A test automation framework is a set of guidelines, coding standards, tools, and libraries that are used to create automated test scripts for software testing. It provides a structured approach to design, develop, execute, and report automation tests efficiently and effectively.
Key features includes
- Test Execution: Provides the capability to execute automated tests across different environments and configurations, often integrating with Continuous Integration/Continuous Deployment (CI/CD) pipelines.
- Reporting and Logging: Generates comprehensive reports and logs to track test execution results and identify issues easily.
- Assertion Libraries: Includes libraries or built-in functionalities for performing assertions to validate the expected behavior of the application under test.
- Integration with Testing Tools: Integrates with various testing tools such as version control systems, issue tracking systems, test management tools, etc., to streamline the testing process.
- Modularity and Reusability: Promotes creating modular, reusable test components to reduce duplication of code and improve maintainability.
- Support for Multiple Environments: Supports testing across different platforms (e.g., web, mobile, desktop) and environments (e.g., browsers, operating systems, devices).
- Parallel Execution: Allows executing tests in parallel to save time and increase efficiency, especially when dealing with large test suites.
- Support for Test Frameworks: Integrates with popular test frameworks such as JUnit, TestNG, NUnit, etc., to provide additional functionalities and features for test automation. Test Data Management: Facilitates managing test data independently from test scripts, ensuring better maintainability and reusability.
9. What are the different types of test automation frameworks?
- There are different types of testing frameworks and depending on your use case, one of the type can be adopted. here are few
- modular, data driven, keyword driven and hybrid frameworks
10. What is test automation pyramid?
The test automation pyramid was initially developed by Martin Fowler. It is a method for figuring out how to employ the various types of testing automation most effectively. The test pyramid’s fundamental is to have a lot of unit tests lesser integration tests and a lot fewer comprehensive UI tests.
11. How do you measure the success of automation testing?
There are different ways you measure the success of test automation
- Time saved
- Re-usability
- Maintenance cost
- Time takes to run the tests
- # of bugs found and test coverage
12. Can Automation testing replace manual testing?
Though Automation testing brings lots of value, it’s not possible to replace manual testing all the time. there will be a case where you can’t automate certain types of testing and human testing is required. we discussed this in one of the above questions. please refer what can’t be automated.
13. What are the different tools/ software used in test automation?
- We generally automate GUI (Graphical user interface) testing, API testing. ( I am not mentioning performance and security testing here).
- For UI testing, there are several tools available like Selenium Webdriver, QTP, Playwright, Cypress, Appium, Robot framework and more.
- For API testing, Postman, SOAPUI, Karate framework, RestAssured with Java
Along with this for some of the tools we have to use third party tools for. test execution, reporting and logging.
- Test scheduling and execution – JUnit, TestNG, Cucumber, Karate and more
- Logging – Log4J
- Reporting – Cucumber, Junit, TestNG, Serenity, Extent and more
14. Who is responsible for test automation in the team? is it developers or testers?
Its a team responsibility, both developers and test team should work together to help or unblock each other in achieving the quality effectively.
15. What is the average number of test cases you have automated in your experience?
It changes project to project. Depending on application complexity, usability of test framework, it varies.