问题
I am looking for effective project Structure to manage it with POM, Cucumber(Feature and Step definition Files) under Maven's Src & test folders.
What should be correct way to manage? Where to use Maven's src and test folder.
Please Share. Thanks in Advance.
回答1:
Project Structure for a Maven project with Cucumber + POM
base package contains Page object initialization class where it can be extended to all the page classes
browser package contains the browser factory class which contains the methods to invoke Chrome, Firefox, IE etc.,
custom Exception package used to throw the custom messages
features package contains the feature files
pages package contains the page objects classes like login, home page with the relevant web elements and methods
resources package contains the driver information, test data information, xml configuration, property file etc.,
runner package contains the runner classes which is created in manual. Otherwise we can refer the same package for dynamic runner class creation in maven parallel plugin dependency.
steps package contains the step definition for each specific pages.
utils package contains the utility classes like common utility, selenium utility, excel utility etc.,
Under target
cucumber - parallel contains the parallel execution report
cucumber-reports contains the normal execution report
generated-test-sources contains the dynamic runner class files which is created during the run time for parallel execution.
来源:https://stackoverflow.com/questions/51400582/directory-structure-for-cucumber-maven-pom-project-under-src-test-folder