Packages
Last updated
Was this helpful?
Last updated
Was this helpful?
Our framework will contain following packages inside src/test/java source folder. (Since it's the testing code always recommended to write in src/test/java instead of src/main/java, even it makes sense to delete src/main/java)
context - Will contain all the necessary classes which hold constants, global variables etc.,
factory - Will contain all the factory methods. Like creation of page objects.
listeners - Will contain all the TestNG listeners for logging, reporting and mailing etc.,
pages - Will contain all the Page Object classes.
report - Will contain reporting related code.
tests - Will contain our actual automation test cases.
util - Will contain all the utility classes and methods that will hep us to run, log, report our test cases.
Even create one more source folder src/test/resources. Which will be the location for all of our non java files.
drivers - For drivers that are required by selenium.
config - For all configuration and property files.
suites - For test suites.
Once we create all these packages, our project is going to look similar to.
We will go through packages one by one and create classes in them.