SilentICE
SilentICE

Reputation: 700

Creating an executable jar of selenium test from a maven project

I have several selenium tests as part of my project (project X). I would like to be able to create an executable jar which will run the tests, say against a production environment rather than either local or part of the CI build. These will be run periodically to ensure that the current live behaviour of the application matches that of the point of release. For example, it calls to a number of webapps which are deployed separately and their output may change before an update is release of project X.

Ideally I would like to use something like the assembly plugin to create this as part of the build but I am open to other suggestions. Currently the only thing I can think of is to checkout the project on some machine and execute the build as required.

Upvotes: 2

Views: 1446

Answers (1)

thomascrabs
thomascrabs

Reputation: 73

Never been a fan of using unit testing frameworks to run selenium (as they aren't unit tests) so tend to use a custom framework to output results and to define configuration etc.

Assuming your selenium tests are well structured it should be easy to strip these out into a new project and wrap a framework round to control everything and also output results.

If using as part of CI you can also just run as a downstream executable which will give you a more accurate lifecycle - build, unit test, integration test, deploy, end-to-end test / UI test.

Combinations of the above should give you the flexibility to run as part of CI and also ad-hoc against different deployed systems.

Upvotes: 1

Related Questions