0

I have to merge my test automation code base with my application development code base in same repo, i have 2 different pom's- one for development code and other for automation testing code.

Dependencies used in development code are not there in testing code and vice-versa. Currently i have merged both the pom's and able to run automated tests on CI/CD pipeline.

But need to have separate pom's for both of them as it might take more time for dev code to build/deploy on CI/CD pipeline because of dependencies present in testing pom.

Please suggest the efficient way to do this?

Arpit Jain
  • 51
  • 3
  • why do you want the code to be merged , keep it as separate branch , don't create extra bottle neck if developers are not reviewing your code – PDHide Mar 05 '21 at 13:29
  • if you really want to merge then use scope as test for your dependency , so that it will be used only for "mvn test" – PDHide Mar 05 '21 at 13:30
  • Get all the code in one branch ... define the selenium tests as integration tests (follow the naming convention) and use maven-failsafe-plugin to execute them. Also create a profile to activate/deactivate(by default) the integration tests...no separate pom files etc. The dependencies are not related to the time to deploy code?... – khmarbaise Mar 05 '21 at 13:55
  • Thanks @PDHide , i want in same repo so that to run on ci/cd pipeline in automated way. However when i used scope as test, functions not getting identified though still present under dependency. When removed scope then working fine. – Arpit Jain Mar 07 '21 at 12:16
  • 1
    @ArpitJain for running in CI/CD you don't need it to be in the same repo , you can have a separate test step. – PDHide Mar 07 '21 at 12:23
  • 1
    if you give scope as test then the folder structure should be src/test – PDHide Mar 07 '21 at 12:24
  • https://stackoverflow.com/questions/26975818/what-is-scope-under-dependency-in-pom-xml-for – PDHide Mar 07 '21 at 12:25

0 Answers0