5

I'm new to Coldfusion development and inherited an already deployed project. Due to various technical limitation, it is not possible to develop locally on our workstations (like you would do for .net). As a consequence, the files are edited directly from the test servers (and commited on SVN from there).

Once again, as the test db is usually way behind the prod db, we often have to edit the code directly from the prod server (please don't blame here, I know this is a bad thing).

I'd like to take this opportunity to put back the process into something manageable:

  • Local code edition
  • Unit testing using MXUnit
  • Commit with SVN
  • Have a hook on SVN that would deploy to the test server
  • Test on the test server
  • Trigger somehow the deployment to the prod servers

In terms of technology, I was thinking of a combination of: CFEclipse, MXUnit, SVN and ANT

Aside from SVN, everything would be new and can be changed of you have a better advice.

Did anyone have implemented such processes and could be me a hint on how to get started?

ale
  • 6,369
  • 7
  • 55
  • 65
E. Jaep
  • 2,095
  • 1
  • 30
  • 56
  • Could you explain a little bit about what the technical limitations are of not developing locally? People usually tell me that they can't develop locally, because there production is either Windows, or something else that they "can't" replicate. If that's the case, then remember that development platforms don't have to replicate the production... that's what staging is for. – Dave Long Jun 06 '11 at 00:20
  • The limitation is mainly around licenses. We do not have licenses for the CMS aside from servers. As a consequence, we have to push the changes to servers in order to be able to see them. We could develop locally components, but as soon as it requires some display we have to move code to the servers. Finally, we are using objects exposed by the CMS. As a consequence, we have to run from servers. – E. Jaep Jun 06 '11 at 10:51
  • @orangepips: please send me your contact details. I'd prefer giving you the name of the CMS offline (just want to make sure I don't offend anyone here) – E. Jaep Jun 10 '11 at 14:29
  • Click through to my profile http://stackoverflow.com/users/470838/orangepips to see my email address. – orangepips Jun 10 '11 at 14:50
  • I have to become blind... :-) I can't find your email address but only your linkedIn page. – E. Jaep Jun 10 '11 at 15:01

2 Answers2

5

In our office we tried firstly ANT + MXUnit + Selenium + TeamCity but after some time we decided to switch to Jenkins/Hudson continuous integration server.

There are plenty of how-tos and tutorials about continuous integration so I guess you don't need me here to explain it in details.

All in all, build your ANT scripts for svncheckin/checkout, build MXUnit tests, generate/write Selenium tests and run everything from Jenkins user interface on test server.

Quick hints: Develop ANT scripts locally, to avoid deleting files on server (happened to us once :) ). MXUnit is tricky when it comes to running it from browser, pay attention to application scoped variables. You can write/edit Selenium tests in many languages, Java seemed best choice in our case. Both TeamCity and Jenkins have their pros and cons, better try both and see which suits you better.

Related links:

http://www.jetbrains.com/teamcity/

http://jenkins-ci.org/

http://seleniumhq.org/

You can also take a look at BDD (Behavior driven development) and include JBehave http://jbehave.org/ into your agile development workflow, awesome stuff if you have "complicated" clients.

Good luck!

zarko.susnjar
  • 2,053
  • 2
  • 17
  • 35
  • We have Jenkins with ANT and MXUnit, develop using CFEclipse and store code in git – Aaron Silverman Jun 05 '11 at 20:45
  • 2
    Documentation for hooking up MXUnit with ANT and Jenkins is here: http://wiki.mxunit.org/display/default/Automation+with+Jenkins+Continuous+Integration+Server The samples/build.xml file referenced in that documentation includes sample usage of the svn ant task, so you can use svnupdate from within ANT to update your dev location prior to running tests, which is one route to take for getting the latest code onto dev. I have other sample ANT code to use ssh/scp to push code to production if you're interested – marc esher Jun 06 '11 at 13:56
0

Look into git instead of svn. Much better. And Mylyn/Tasktop to tie everything together in your ide.

Mike Henke
  • 864
  • 1
  • 8
  • 22
  • Mike, you aren't giving much information about why git is better. Truthfully, I love using Git over SVN for various reasons, but that is just me. If Jaepetto is looking to use Ant, then it may be less of a headache to use SVN, especially if he already knows it. Ant doesn't have any native support for Git, although I do have a [snippet](https://github.com/davidlong03/Demo-Stuff/blob/master/build.xml) that I use to add Git to Ant. – Dave Long Jun 06 '11 at 00:25
  • I'd love to use git instead of SVN. But it would imply a complete migration of the repository. For the time being, I'll try not to change everything at one shot. – E. Jaep Jun 06 '11 at 10:53
  • from what I heard the migration is pretty painless. – Henry Jun 06 '11 at 16:33
  • @Henry: unfortunately, this is out of my sphere of influence here. – E. Jaep Jun 10 '11 at 14:31
  • David, Ant doesn't support SVN "natively" either but with a task. Here is Git Ant Tasks via JGit http://aniszczyk.org/2011/05/12/git-ant-tasks-via-jgit/ But my point of Mylyn/Tasktop tie-ing everything together is still true with SVN. Tasktop/Mylyn now has a build view along with other enhancements – Mike Henke Jul 06 '11 at 15:20