Development

HowToSaveLimeTestsInXUnitFormatAndIntegrateThemWithCruiseControl

You must first sign up to be able to contribute.

Version 6 (modified by Sebastien.Adgnot, 11 years ago)
--

How to generate Lime tests in xUnit format and integrate them with Cruise Control?

Install the plugin

  • download and put the attached file to this page in the plugins directory.
  • add the plugin to "enabled_modules" in settings.yml of your application (frontend|backend).
  • modify the following variables to the needs of your project in app.yml of your application:
    • app_test4cruise_lime_file: path to the lime.php file in Symfony
    • app_test4cruise_sg_lime_file: path to the extended library
    • app_test4cruise_log: path to generated log file (by default in sf_log_dir/xunit/log4cruise.xml)
  • you should be able to launch the pake task and get a xml file in the right directory:
        symfony sg-test4cruise (frontend|backend)
    

How to setup CruiseControl

  • then modify:
  <exec dir="${basedir}/My_Project/test/" executable="phpunit" failonerror="true">
    <arg line="--log-xml ${basedir}/logs/phpunit_all.xml AllTest" />
  </exec>

with

  <exec dir="${basedir}/My_Project/test/" executable="php" failonerror="true">
    <arg line="symfony sg-test4cruise (frontend|backend)" />
  </exec>

and

  <delete dir="My_Project" />
  <cvs cvsRoot=":ext:cruise@cvs:/var/opt/cvs"
       command="co My_Project" reallyquiet="true" />

with

  <exec executable="svn">
    <arg line="update --username ''username'' --password ''password'' http://''your/project''/trunk/ /''your/project''/checkout/" />
  </exec>

(you can also maybe try to connect cruise control with SVN this way: http://cruisecontrol.sourceforge.net/main/configxml.html#svn)

  • launch cruisecontrol.sh and if everything is fine, you should get your first build and results of your tests. Congratulations!
  • to put CruiseControl as a daemon (don't forget to edit the file and modify the first few lines of the file depending of the configuration of your server)

Conclusion

  • feel free to contact me if you have any trouble with the setup sebastien AT splitgames DOT com :)

Attachments