How to explain Selenium Automation Framework (DataDriven+POM) in Interview?

When we give any answer in the interview the one and only important thing we need to keep in mind is It should be brief and to the point so that interviewer should not lose interest from our answer.
 
So whenever we need to give answer about framework we can divide framework in terms of different components which we are using to build a structure which we called a framework and which we use in our company:

We can start like mentioned below.

1. Design - We are using Page Object with Page Factory framework with functional/structural implementation.

Make sure you know what functional/structural implementation in this framework.

2. Build Tool - We are using standardized maven project for build, execution & dependency management.

Make sure you know about a build tool like ant/maven

3. Language and IDE-  We are using JAVA/Ruby as our binding language and eclipse as IDE. We use java because it is known to most people when we started automation.

4. Action Driver - We also have library package to maintain common functions related to All action method/Selenium/waits/directory creations etc

5. BaseClass - We also have a base page class for common functions use by all pages – to load config.properties file and Web Driver initialization.

Make sure you know why we have Base Page class in page object

5. Test Class -  We have maintained a page class for every page in our application and a page test class to maintain test for that pages. E.g. Product listing page, Add to cart page, Payment page, Invoice generation page.

Make sure you know we maintain different page and all different annotations in page factory

Page Objects Package- com.mystore.pageobjects

Page Class – AddToCart.java

6. We have maintained separate package for page test e.g.

Test Package - com.mystore.testcases

Test Class – AddToCartTest.java

Note:  Maintaining different packages is always a good practice to follow.

7. Utility component - Extent Class, Log4j class, Listeners, Data Providers

Package Name: com.mystore.utility

8. Test Data - For handling data driven cases we are passing data using xlsx file/xls file /csv file.

>> Make sure you know about libraries like openCSV,JXL/APACHE POI/Java Properties class

9. Test Framework - For ordering tests we are using testng framework.

Make sure you know how to use different annotations and run testng.xml using maven

10. Logs - We are using log4j library to maintain logging of our project. We are using all kinds of logging statements like INFO, DEBUG, and ERROR etc. We have maintained a separate class for it in com.mystore.utility package

>> Make sure you know this library usage in java, we can use log4j by mentioning properties of this framework in a xml file or a properties file and putting that file on build path.

11. Reports - We are using Extent Report for reporting purpose. It is a third party report and it is easily available at maven central repo.

We are using maven postman plugin / JAVA API to send generated extent reports as an attachment to client Distribution list.

>> Make sure you know about this plugin of maven or Java API

12. Version Control - We check in our code into client repository using a version controlling tool git bash on windows system.

13. CI tool - We have integrated our project with CI tool i.e. Jenkins to run the build automatically.

Summary: - We should talk about all major components in our project like Logging, Emailing, Page Objects, Page Factory Annotations, TestNG, Exception Handling, Build tool, Version controlling tool, DataDriven usage etc.

Please refer this post as well -  https://www.automationtestinginsider.com/2020/02/selenium-data-driven-framework-with-pom.html

No comments:

Post a Comment