any continuous build interest

15 views
Skip to first unread message

CedricWalter

unread,
Jan 4, 2010, 3:28:45 PM1/4/10
to Joomla! CMS Development
Hi all,

Is Joomla! interested in running a continuous build strategy? I can
propose/promise you the following:

* Any continuous build server will be able to run the build-> no boat
anchor software: Teamcity, Bamboo, Hudson, Cruise Control and so on
will work just if you configure them -> mostly using their built in
assistant for apache maven (http://maven.apache.org/)

every commit can/will trigger a build. commit can be rejected if build
is breaking test cases with delayed commit (http://www.jetbrains.com/
teamcity/delayed_commit.html)

* By using maven for php (http://www.php-maven.org/), you will be able
to have a frame for the lifecycle phase (http://maven.apache.org/
guides/introduction/introduction-to-the-
lifecycle.html#Lifecycle_Reference and http://www.php-maven.org/lifecycle.html)
and as a result you'll be able to deliver Joomla! faster and with more
confidence.

* There is a huge number of reporting and build plugins available for
css, html, code convention check (chekstyle ala PHPCheckstyle)

* Documentation (PHPDocumentor, Doxygen), is generated along with a
customizable site (part of lifecycle, one like this http://tuxdroid.waltercedric.com/
done without any effort!), tar.gz, zip is generated in maven phase
package

* Convention over configuration: Joomla! code will be in src/main/php
and test cases in same project in /src/test/php and run if your maven
phase is = or bigger than test. Developer have a proven frame, all
plugins expect to find code there (you can have a custom mapping but
it is not recommended)

* Maven is a proven standard for build and do not replace but
complement ant, it is written mostly in ant

* IDE support in eclipse (M2eclipse I use it at work), Netbeans/
intellij is natively supported

* PHPUnit, Selenium, and any java tool for functionnal testing cab be
plugged in build lifecycle. Even Acunetix (better run another build
daily)


What Do I ask?

* your support! do you want to?

I can make a prototype, In fact I need to
1. Connect in read only mode to your SVN, (DONE)
2. In maven phase "initialize" move your php around to src/main/php
and src/test/php (you have 2 root project in svn but testcases clearly
belong as near as source code), using a bit of ant : (WORKAROUND)
3. show you that if someone commit something, the build get triggered,
test cases run, build stay green

Best case scenario: you like it, you'll have to move files in correct
maven mapping (src/main/php and src/test/php),

what do you all think?

Mitch Pirtle

unread,
Jan 4, 2010, 8:12:31 PM1/4/10
to joomla-...@googlegroups.com
On Mon, Jan 4, 2010 at 3:28 PM, CedricWalter <cedric...@gmail.com> wrote:
> what do you all think?

I'd LOVE it if you could do that, but I cannot speak for the project.

To me this is a chance to really demonstrate the capabilities and
skills of the folks behind the project, and also show how it should be
done. I've seen this only in private, professional environments and
think it would be very cool to see on a FOSS project.

Documentation teams, testing, oh man all kinds of goodness would ensue :-)

-- Mitch

Niels Braczek

unread,
Jan 4, 2010, 8:47:30 PM1/4/10
to joomla-...@googlegroups.com
Mitch Pirtle schrieb:

> On Mon, Jan 4, 2010 at 3:28 PM, CedricWalter <cedric...@gmail.com> wrote:

>> what do you all think?
>
> I'd LOVE it if you could do that, but I cannot speak for the project.

Me too!

Regards,
Niels

--
| http://www.kolleg.de · Das Portal der Kollegs in Deutschland |
| http://www.bsds.de · BSDS Braczek Software- und DatenSysteme |
| Webdesign · Webhosting · e-Commerce · Joomla! Content Management |
------------------------------------------------------------------

Mark Dexter

unread,
Jan 4, 2010, 9:39:46 PM1/4/10
to joomla-...@googlegroups.com
Hi all. Ian has been working to set up this exact type of environment, and we're planning on having it ready to go for 1.6. At the moment, we still have a lot of work to do on unit tests, but there are some people working in there and we could always use more.

Also, we plan to implement a lot of functional tests as well. We've got a few basic functional tests written and are waiting for a bit more stability in 1.6 before writing too many more.

Anyone who wants to get involved in this will be most welcome. Probably the best thing is to contact Ian (or just post back here). Thanks. Mark


--

You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To post to this group, send an email to joomla-...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-cm...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-cms?hl=en-GB.



CedricWalter

unread,
Jan 6, 2010, 4:27:01 AM1/6/10
to Joomla! CMS Development
Hi All,

Can Ian get in touch with me?
http://www.waltercedric.com/-contact-me.html

On Jan 5, 3:39 am, Mark Dexter <dextercow...@gmail.com> wrote:
> Hi all. Ian has been working to set up this exact type of environment, and
> we're planning on having it ready to go for 1.6. At the moment, we still
> have a lot of work to do on unit tests, but there are some people working in
> there and we could always use more.
>
> Also, we plan to implement a lot of functional tests as well. We've got a
> few basic functional tests written and are waiting for a bit more stability
> in 1.6 before writing too many more.
>
> Anyone who wants to get involved in this will be most welcome. Probably the
> best thing is to contact Ian (or just post back here). Thanks. Mark
>
>
>
> On Mon, Jan 4, 2010 at 5:47 PM, Niels Braczek <nbrac...@bsds.de> wrote:
> > Mitch Pirtle schrieb:

> > > On Mon, Jan 4, 2010 at 3:28 PM, CedricWalter <cedric.wal...@gmail.com>


> > wrote:
>
> > >> what do you all think?
>
> > > I'd LOVE it if you could do that, but I cannot speak for the project.
>
> > Me too!
>
> > Regards,
> > Niels
>
> > --
> > |http://www.kolleg.de  ·   Das Portal der Kollegs in Deutschland |
> > |http://www.bsds.de  ·   BSDS Braczek Software- und DatenSysteme |
> > | Webdesign · Webhosting · e-Commerce · Joomla! Content Management |
> >  ------------------------------------------------------------------
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "Joomla! CMS Development" group.
> > To post to this group, send an email to joomla-...@googlegroups.com.
> > To unsubscribe from this group, send email to

> > joomla-dev-cm...@googlegroups.com<joomla-dev-cms%2Bunsubscribe@go oglegroups.com>

Shyam Verma

unread,
Jan 6, 2010, 9:45:43 AM1/6/10
to joomla-...@googlegroups.com
Hi Ian/Mark,

I have recently setup things for my own company.
Build, Setup and Test via Phing + Phpunit.
Also I have set Functional Test via Phpunit + Selenium.

So let me know if I can help you guys.

Thanks
Shyam
Team JoomlaXi

To unsubscribe from this group, send email to joomla-dev-cm...@googlegroups.com.

Ian MacLennan

unread,
Jan 6, 2010, 10:49:03 AM1/6/10
to joomla-...@googlegroups.com
Sorry, haven't had a chance to respond to this thread yet.  What I currently have is Hudson setup using a very rudimentary phing script which triggers unit test runs and functional test (Selenium) runs every 6 hours and when a commit is made.

Right now, this runs on my server at home.  I'm in the process of getting it setup on a build server we have, but the build server is a Mac which has made some things tricky (in large part due to my unfamiliarity with Macs and partially due to the fact that I haven't figured out how to get console access yet and Sam is overworked and hasn't really had time, and all the documentation for Macs seems to be very heavily console based).

In any case, while I work on that piece, I'd be very interested in hearing more about Maven and how it fits in to the picture.

The other problem set I'm currently trying to work through/think through is how to test with the diversity that I'd like in terms of functional testing.  Selenium allows you to run tests in a real world browser against a real world server.  This would allow us to test against the major browsers and against various PHP versions.

A while back I went through the steps of compiling about 10 different versions of PHP and has them all running on one box using lighttpd just with different ports.

Thinking this through and working it through, I think in the long run it would be better to setup virtual machines where you would have a VM with a certain server configuration (i.e. PHP 5.2.3 on Ubuntu 8.10 or PHP 5.3.0 on IIS or whatever).  The question then becomes where you run your browser from.  Browsers can be platform dependent, so you'd want them on a VM as well.  You could run the browser on the same VM as the server, or you can run the browser on a different VM.  For flexibility, it may be better to have them on different servers.

So what I think we want is a script that will execute functional testing by:
1. starting a server VM
2. starting a browser VM (which would have Selenium server running)
3. Running phpunit to connect to the Selenium server on 2 and test against 1.

The other issues to work through is how to present and visualize the test results, and eventually how to set things up so that commits get rejected if it breaks a test (or better yet if it moves the test code coverage metric below a certain value).

So, I'm not sure how best to orchestrate from here at this point.  Maybe people can share their ideas on the mechanics of how this might work.

Thanks for all your help!
Ian

Shyam Verma

unread,
Jan 6, 2010, 11:07:58 AM1/6/10
to joomla-...@googlegroups.com
Hi Ian,

Thanks for quite a gud prespective of the work.

Few open questions in my mind are -
  1. Why the build server is Mac, why not an ubuntu box, linux servers are really gud for development purpose.
  2. Virtual machines are gud to use, probably if you want to test Joomla over various OS + PHP  varinats, then we need at least 4-5 machines each having capacity to run 3-4 VM of 512 MB each.
  3. CruiseControl have very gud integration with phpUnderControl, so we should choose, the one (Maven/CruiseControl) which is stable and quick to put into work.
  4. For distributing selenium testcases over machines we can use selenium grid, and thats the best solution, but how we are going to distribute unit testcases.
  5. For adding quality we can apply
    • Zend Code Analyzer
    • Selected php code sniffers
    • code coverage metrices
  6. We should run our build process through Phing scripts, as thats the stable and quick thing for build systems.

Thanks

Shyam
Team JoomlaXi

Ian MacLennan

unread,
Jan 6, 2010, 11:24:21 AM1/6/10
to joomla-...@googlegroups.com
On Wed, Jan 6, 2010 at 11:07 AM, Shyam Verma <er.ss...@gmail.com> wrote:
Hi Ian,

Thanks for quite a gud prespective of the work.

Few open questions in my mind are -
  1. Why the build server is Mac, why not an ubuntu box, linux servers are really gud for development purpose. 
Because the Mac is what we have.
  1. Virtual machines are gud to use, probably if you want to test Joomla over various OS + PHP  varinats, then we need at least 4-5 machines each having capacity to run 3-4 VM of 512 MB each.
I don't think we need to test each commit on each variant, so I would think we can set the frequency of tests to a level that the one machine can handle.
  1. CruiseControl have very gud integration with phpUnderControl, so we should choose, the one (Maven/CruiseControl) which is stable and quick to put into work.
In my experience Hudson has been easier to use a presents nicer results, although this might be moot b/c having the CI server world visible may not be practical - it will probably be better to just post the results somewhere or write a PHP script to view them.  I'm not set on Hudson, but it's what I'm using right now and it works.
 
  1. For distributing selenium testcases over machines we can use selenium grid, and thats the best solution, but how we are going to distribute unit testcases.
I'm not worried about distributing the unit test cases b/c PHPUnit's version requirements move pretty quickly so it isn't really practical.
  1. For adding quality we can apply
    • Zend Code Analyzer
    • Selected php code sniffers
    • code coverage metrices
  2. We should run our build process through Phing scripts, as thats the stable and quick thing for build systems.


Thanks for your thoughts.

CedricWalter

unread,
Jan 7, 2010, 5:34:10 AM1/7/10
to Joomla! CMS Development
Hi all,

* Lets talk in a Skype session all together
* Lets open a WIKI to document from the beginning how it is working,
what concept are, status

Concerning supporting multiple OS,php, browser it is not a issue :-)
With Bamboo or TeamCity you can start Java agent that are waiting for
a task from the controller. You can have an unlimited number of agent
distributed worldwide, one for each configuration you want to
support... each agent checkout code, compile, run test cases, and
report to controller results

Agent run in parallel of course !
you can then design selenium test against a local selenium RC that is
start in maven phase pre-integration test (each agent has its own)

I do this since 3 years in my company, not with php but java
Luckily maven for php exist and I wouldnt start any project anymore
only with ant... (I use ant since 2001)


see it live at teamcity.waltercedric.com
or bamboo.waltercedric.com


On Jan 6, 5:24 pm, Ian MacLennan <ian.maclen...@joomla.org> wrote:


> On Wed, Jan 6, 2010 at 11:07 AM, Shyam Verma <er.ssve...@gmail.com> wrote:
> > Hi Ian,
>
> > Thanks for quite a gud prespective of the work.
>
> > Few open questions in my mind are -
>

> >    1. Why the build server is Mac, why not an ubuntu box, linux servers


> >    are really gud for development purpose.
>
> > Because the Mac is what we have.
>

> >    1. Virtual machines are gud to use, probably if you want to test Joomla


> >    over various OS + PHP  varinats, then we need at least 4-5 machines each
> >    having capacity to run 3-4 VM of 512 MB each.
>
> > I don't think we need to test each commit on each variant, so I would think
>
> we can set the frequency of tests to a level that the one machine can
> handle.
>
>
>

> >    1. CruiseControl have very gud integration with phpUnderControl, so we


> >    should choose, the one (Maven/CruiseControl) which is stable and quick to
> >    put into work.
>
> > In my experience Hudson has been easier to use a presents nicer results,
>
> although this might be moot b/c having the CI server world visible may not
> be practical - it will probably be better to just post the results somewhere
> or write a PHP script to view them.  I'm not set on Hudson, but it's what
> I'm using right now and it works.
>
>
>

> >    1. For distributing selenium testcases over machines we can use


> >    selenium grid, and thats the best solution, but how we are going to
> >    distribute unit testcases.
>
> > I'm not worried about distributing the unit test cases b/c PHPUnit's
>
> version requirements move pretty quickly so it isn't really practical.
>
>
>

> >    1. For adding quality we can apply
> >       - Zend Code Analyzer
> >       - Selected php code sniffers
> >       - code coverage metrices
> >    2. We should run our build process through Phing scripts, as thats the

CedricWalter

unread,
Feb 9, 2010, 10:23:22 AM2/9/10
to Joomla! CMS Development
I did Document my work in progress at

http://wiki.waltercedric.com/index.php?title=ContinuousBuildforJoomla

What is done
* Simple way to develop extensions
* autodeploy to a runtime joomla in development mode without phing
* testcase PHPUnit run at every commit
* Doxygen adn PHPDocumentator run in maven phase site and produce a
browsable internet site
* Packaging of extensions done automatically in maven phase package
* Private build ok -> auto commit only if your changes in a build do
not break any testcases
* Documentation

* Selenium next to be tried

Reply all
Reply to author
Forward
0 new messages