Java EE – run selenium test using Maven surefire plugin or Maven failsafe plugin?

I'm confused about the concept of using Maven surefire plugin or Maven failsafe plugin to run my selenium tests (not unit tests) in the integration test phase, @ h_ 404_ 2 @ I saw some examples using Maven surefire plugin and others using maven failuresafe plugin

Please use examples or links to guide the configuration

Solution

You should run selenium tests using Maven - failsafe - plugin

The fail safe plug-in runs the test in the integration test phase and will not fail when the integration test fails, so it allows Maven to run the post integration test phase The fail safe plug-in cannot be built during the validation phase This is very important because the server / setup data is usually started in the pre integration test phase and shut down / cleaned up in the post integration test phase when running selenium tests

See usage of the failsafe plugin and Maven lifecycles reference

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>