Dashboard > Documentation > Documentation > Demo - Web and Database Testing - Continuous Integration with CruiseControl
  Documentation Log In | Sign Up   View a printable version of the current page.  
  Demo - Web and Database Testing - Continuous Integration with CruiseControl
Added by Adam Skogman, last edited by Björn Granvik on Feb 08, 2006  (view change)
Labels: 
(None)

This guide shows DDSteps 1.0.
This getting started guide is currently for Windows only.

Prerequisites

Only the software listed here is needed. If you read the old guide, this is a much shorter list now...

  • Java 1.5 - make sure you have Java 1.5 and JAVA_HOME pointing to the installation.
  • Subversion 1.2.3 - Install it and put it in your PATH (environment variable). If you can execute "svn help" from your command line, you are good to go.
  • Eclipse 3.1.1 - if you want to use the included workspace.
  • Subclipse - Eclipse plugin for Subversion. Use the update site: http://springide.org/updatesite/
  • Winamp - for the nice demo effect... Should go in "C:\Program Files\Winamp".
JAVA_HOME

Double-check that your JAVA_HOME is pointing to a Java 1.5 (aka 5.0) JVM.

Optional

You may want these too...

  • Spring IDE Plugin for Eclipse

Installation

  1. Download the (rather large) zip file ddsteps-demo-cruisecontrol-0.3.zip.
  2. Unzip to "C:\". Use "unzip here" or similar if you are using WinZip. Make sure the demo is in the folder "C:\ddsteps" and not in "C:\ddsteps-demo-0.3\ddsteps" or anything like that.

Running Cruise Control

  1. Double-click on "c:\ddsteps\startDemo.bat"
    • Four console windows will appear:
      1. Subversion
      2. Hypersoniq
      3. Tomcat (acually, this opens two windows, but you can close the one with the prompt)
      4. CruiseControl
  2. Open a browser to see

The first time you start, CruiseControl will automatically build and deploy the PetClinic and run all tests. The CruiseControl Web GUI may look a bit weird before the first build is done.

Cruise Control is tuned for a DEMO so it will build check the SVN repo every 10 seconds and build after almost no quiet period. This is good in a demo, but should be increased when you run for real.

Making Changes

  1. Make sure the subversion server is started (either because you started the demo with startDemo.bat or you can run the "C:\ddsteps\svn\subversion.bat" script).
  2. Open Eclipse
  3. Create a new workspace, anywhere you like. A good place may be "C:\ddsteps\workspace".
  4. Choose "Import..." and select "Team Project Set". Select the file "C:\ddsteps\projectSet.psf".
  5. Now Eclipse will pull in the projects from the subversion server.
  6. Edit some file, like "PetFTest.xls". Remember to do "refresh" (select the project and hit F5) so that Eclipse detects your changes.
  7. Check in the file.
  8. Watch as cruise control builds.

Running tests from Eclipse

  • Just Right-click on the test (like PetFTest) and choose "Run As JUnit...".
  • Make sure the pet clinic webapp is running.
  • When CruiseControl builds, it will deploy petclinic on the tomcat and leave it running there.

FAQ

  • The Spring Plugin in Eclipse lists some problems in the "ddstesp-config.xml". This is a bug in the Spring IDE plugin - it does not understand that you are using autowire to inject stuff into the constructor arguments.
  • The first build (0.0.1) is successful, but in the Web GUI there is a red warning: "FAIL - No context exists for path /petclinic". This is ok, it just means that there was no previous petclinic webapp in tomcat to undeploy. It's a silly Ant bug, but we cannot get rid of it...

URLs

Are you enjoying Confluence? Please consider purchasing it today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2 Build:#512 Apr 26, 2006) - Bug/feature request - Contact Administrators