Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
219 views
by Contributing Tester (92 points)
Maven structure is as follows:
src/main/java

src/main/resources

src/test/java

src/test/resources

What approach should we follow to locate packages?

I have kept Generic function library packages in "src/main/java" and Project specific in "src/test/java".

1 Answer

0 like 0 dislike
by The go-to Tester (181 points)
selected by
 
Best answer

Usually we keep project related code inside src/main/java and keep tests inside src/test/java

 

E.g.You can have a look at this project

https://github.com/selenium-webdriver-software-testing/kspl-selenium-helper

If you observe that, I have added actual working code inside

https://github.com/selenium-webdriver-software-testing/kspl-selenium-helper/tree/master/src/main/java/in/mayurshah

unit code for the same are at

https://github.com/selenium-webdriver-software-testing/kspl-selenium-helper/tree/master/src/test/java/in/mayurshah

When you compile and install your library, usually classes inside "src/main/java" are used to perform tests before creating jar file and those will not be added to the jar file.

 

Hope that helps!


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

1.4k questions

1.6k answers

866 comments

1.9k users

...