I've been spending for at least 3 months building a Test Automation Framework from scratch using Selenium WebDriver(Java)
and TestNG
.
I did the next things:
adapted the concepts of
page-object-model
.integrated
excel functionality to save the test data
.added
ExtentReports
rather than the defaultTestNG
reporting.included
object property file
to my project.
This may sound silly but, I don't have any idea how to integrate other project in the framework that I've made. I have the next two questions:
- Let's say my project name for the framework is AutomationFramework, now when there's a new project example WebAppProject1, how should WebAppProject1 interact with
AutomationFramework
? - How would I achieve the files from the framework in order for it to be used in
WebAppProject1
?
AutomationFramework project
includes the ff classes:
a. Testcase.java
- includes all @Test methods like Signup, Login, ForgotPassword
b. Page Object classes
- classes that locate webElements. Login.java, Signup.java and so on
c. UserDetails.java
- class that returns random data to Testcase.java like Firstname, Lastname and so on
d. ExcelConfig.java
- class which sets up excel functionality like check last row and adding all test data to the excel file
e. ConfigProperty.java
- this class calls the property name for each variables stored in object repository like app URL, chrome-driver path, excel path and so on
f. Config.property
- *holds the app URL, chrome-driver path, excel path and so on *.