Java – Selenium Automation Framework: We can start as mentioned below. We are using Page Object with Page Factory framework with functional/structural implementation.
- Make sure you know what is functional/structural implementation in this framework.
We have maintained a page class for every page in our application and a page test class to maintain a test for that pages. e.g. product listing page, Add to cart page, Payment page, Invoice generation page.
- Make sure you know we maintain the different page and page test class and all different annotations in the page factory
We have maintained a separate package for page and page test e.g. com.companyName.page1 com.companyName.pageTest1
- Maintaining different packages is always a good practice to follow.
We also have a base page class for common functions use by all the pages.
- Make sure you know why we have Base Page class in the page object
We also have a library package to maintain common functions related to Selenium/waits/directory creations etc. We are using JAVA/Ruby as our binding language
- We use Java because it is known to most people when we started automation.
We are using a standardized maven project for build, execution & dependency management.
- Make sure you know about a build tool like ant/maven
For handling data-driven cases we are passing data using java properties file/XLS file /csv file.
- Make sure you know about libraries like openCSV, JXL/APACHE POI/Java Properties class
For ordering tests, we are using the testng framework.
- Prepare testng questions and make sure you know how to run testng.xml using maven
We are using the log4j library to maintain the logging of our project. We are using all kinds of logging statements like INFO, DEBUG, ERROR, etc. We have maintained a separate class for it in com.companyName.main package
- Make sure you know this library usage in Java, we can use log4j by mentioning properties of this framework in an xml file or a properties file and putting that file on the build path.
We are using Extent Report for reporting purposes. It is a third-party report and it is easily available at maven central repo. We are using the maven postman plugin / JAVA API to send generated extent reports as an attachment to the client Distribution list.
- Make sure you know about this plugin of maven or Java API We check-in our code into the client repository using a version controlling tool git bash on the windows system.
Leave a Reply