Java POM: 03-Packages

Packages Schema

Best Practices

  • all lower case names
  • use com.<brandName>.<appType>.<project>
    • the created packages will treat the '.' as a subfolder, yielding:
      • com
        • <brandName>
          • <appType>
            • <project>
  • managing packages this way ensures conflicts won't arise when including other projects for larger ecosystems

 

Package Layout

  • src
    • log4j2.xml - log4j2 Configuration
    • pom.xml - Maven Configuration
    • testng.xml - TestNG Configuration
    • com.us.test.selenium
      • Main
    • com.us.test.selenium.pageactions
      • Home_Actions
    • com.us.test.selenium.pageobjects
      • Home_Page
      • PageBaseClass
    • com.us.test.selenium.tests
      • Login_Home
    • com.us.test.selenium.tests.testdata
      • TestData.xls
    • com.us.test.selenium.util
      • BrowserUtils
      • Constant
      • ElementUtils
      • ExcelUtils
      • LIstener
      • Listeners
      • TestLog

 

Tags