How To Explain Test Automation Framework To The Interviewer

Before going to see how to explain test automation framework to the interviewer, I would highly recommend you go through the below link to learn more about the following

  • Types of Test Automation Frameworks
  • Test Automation Framework Interview Questions

Coming back to this ultimate guide to explain the automation framework in the interview. Here I will explain to you every component of the architecture based on the below-mentioned screenshot. Frame your answer in your own words while explaining the framework to the interviewer.

We need to specify in and out of our Test Automation Framework such as programming language used, Type of framework used, Test Base Class (Initializing WebDriver, Implicit Waits), How we separate Element locators and tests (Page Objects, Page Factory), Utility functions file, Property files, TestNG annotations, How we parameterize tests using Excel files, How we capture error screenshots, Generating reports(Extent Reports), Emailing reports, Version Control System used and Continues Integration Tool used.

Must Read: Where you have applied OOPs in your Automation Framework?

Check below video to see “Selenium Automation Framework Explanation”

If you liked this video, then please subscribe to our YouTube Channel for more video tutorials.

Language: In our Selenium Project we are using Java language. Even though Selenium supports multiple languages, we are using Java language is just because most of the automation developers have knowledge on Selenium with Java.

Java For Selenium

Type of Framework: In our project, we are using Data-driven Framework by using Page Object Model design pattern with Page Factory.

Must Read: Types of Test Automation Framework

POM: As per the Page Object Model, we have maintained a class for every web page. Each web page has a separate class and that class holds the functionality and members of that web page. Separate classes for every individual test.

Difference between Page Object Model and Page Factory

Packages: We have separate packages for Pages and Tests. All the web page related classes come under the Pages package and all the tests related classes come under Tests package.

For example, Home Page and Login Page have separate classes to store element locators. For the login test, there would be a separate class which calls the methods from the Home Page class and Login Page class.

I will explain based on the below-mentioned test automation framework structure.

The above screenshot illustrates a standardized maven project. As per the above maven project, all the tests are kept in the ‘src/test/java‘ and remaining files (such as, element locators (POM classes), utility files, test data, etc.,) kept under ‘src/main/java.

Where you have applied OOPS in Automation Framework

Test Base Class: Test Base class ( deals with all the common functions used by all the pages. This class is responsible for loading the configurations from properties files, Initializing the WebDriver, Implicit Waits, Extent Reports, and also to create the object of FileInputStream which is responsible for pointing towards the file from which the data should be read.

Utility Class (AKA Functions Class): Utility class ( stores and handles the functions (The code which is repetitive in nature such as waits, actions, capturing screenshots, accessing excels, sending email, etc.,) which can be commonly used across the entire framework. The reason behind creating a utility class is to achieve reusability. This class extends the TestBase class to inherit the properties of TestBase in TestUtil.

Properties file: This file ( stores the information that remains static throughout the framework such as browser-specific information, application URL, screenshots path, etc.

All the details which change as per the environment and authorization such as URL, Login Credentials are kept in the file. Keeping these details in a separate file makes it easy to maintain.

Screenshots:  Screenshots will be captured and stored in a separate folder and also the screenshots of failed test cases will be added to the extent reports.

How To Capture Screenshots of Failed Test Cases

Test Data: All the historical test data will be kept in an excel sheet (controller.xlsx). By using ‘controller.xlsx’, we pass test data and handle data-driven testing. We use Apache POI to handle excel sheets.

TestNG: Using TestNG for Assertions, Grouping, and Parallel execution.

Here you could find TestNG Complete Tutorial and also you could find TestNG Interview Questions

Maven: Using Maven for build, execution, and dependency purpose. Integrating the TestNG dependency in the POM.xml file and running this POM.xml file using Jenkins.

How To Create Maven Project

Version Control Tool: We use Git as a repository to store our test scripts.

Jenkins: By using Jenkins CI (Continuous Integration) Tool, we execute test cases on a daily basis and also for nightly execution based on the schedule. Test Results will be sent to the peers using Jenkins.

Maven Project with Jenkins

Extent Reports: For the reporting purpose, we are using Extent Reports. It generates beautiful HTML reports. We use the extent reports for maintaining logs and also to include the screenshots of failed test cases in the Extent Report.

Here you could find How To Generate Extent Reports and also find How To Add Screenshots In Extent Reports .

You have to explain all these when you are asked to explain the test automation framework in the interview. If you have any other thoughts on how to explain the test automation framework, comment below in the comments section.

Here I have hand-picked a few posts which will help you to learn more interview related stuff:

  • Selenium Interview Questions
  • Test Automation Framework Interview Questions
  • TestNG Interview Questions
  • SQL Interview Questions
  • Manual Testing Interview Questions
  • Agile Interview Questions
  • Why You Choose Software Testing As A Career
  • General Interview Questions

If you have any more questions, feel free to ask via comments. If you find this post useful, do share it with your friends on Social Networking.

© 2021