How to run tests after deployment using Maven?

后端 未结 2 1512
余生分开走
余生分开走 2021-02-09 17:10

I\'m trying to decide how to create a set of Acceptance Tests for a Java-EE web application.

Here\'s the setup: Maven is used to generate a WAR file and deploy it into

2条回答
  •  长发绾君心
    2021-02-09 17:24

    If you really need to do stuff after deployment, then you can either run failsafe, and by implication JUnit) as part of the deploy phase.

    What I usually do, if to have seperate module. So, you can have one maven project, which contains your project and a separate 'deployment test' project. Then, building the parent project will build and run your war and then run the deployment tests. You can use junit as normal.

    The second fits better into jenkins because you'll still have a single project as well.

提交回复
热议问题