I want to test my Java EE 6 application (EJB, JPA, CDI, JSF, Primefaces) using Selenium as JUnit tests.
After writing my first tests I want to install a continous integration software. What is the standard of doing so?
- write code
- check code in (e.g. s开发者_开发知识库ubversion)
- CI software checks out the code
- CI software builds the code (e.g. war)
- CI software deploys the build to test server (e.g. Jboss AS)
- CI software runs the JUnit tests
?
Which CI software is able to do so?
At my last company we had ant tasks for the last two stpes you list, the first 2 build steps were taken care of automatically by near default Hudson/Maven integration. Within our maven build, we had a profile for the build server (Hudson) which would invoke the ant tasks appropriately to install the server and deploy the webapp. We had a proof-of-concept with it running some simple selenium tests, but didn't get too far down that path.
Honestly, it wasn't easy; and IMO scripting in ANT stinks, but we did it and it worked. I can only speak for Hudson|Jenkins but with the ability to call out to shell scripts/ant tasks, etc. I think with a little work you could make it do about anything you want.
For continuous integration you can use Jenkins CI and then configure it to checkout code form your git/svn/ mercurial repository , build and run tests either on per checkin basis or periodically
All I know about Jenkins, is that you can do this all with Jenkins CI.
You should also consider using Maven or Ant build scripts to build this for you, and then there is a subversion plugin (or whichever applicable to you) available using which you can do the code checkout.
And then there is a run Shell or Batch option, where in you can get into the directories and run your Ant/Maven scripts/commands. You can also use this start/stop your servers and almost anything.
If you want that build should automatically start after code checkin, then even that is provided as an option, where in the CI polls the SVN (or SCM ) server and then triggers build automatically.
I don't understand, what's there you can't do with CI?
精彩评论