• Funittest

Re: Buildout for funittest

from Sylvain Viollon on Mar 05, 2008 04:14 AM
On Wed, 5 Mar 2008 01:22:48 +0100
"Maik Röder" <maikroeder@...> wrote:

> Hi Sylvain,
> 

  Hi,

> On Tue, Feb 26, 2008 at 5:10 PM, Sylvain Viollon <sylvain@...>
> wrote:
> >
> >  Hello,
> >
> >    I have finish my new packaging. I would like to get you test it,
> > to use it instead of the current one.
> 
> I looked a bit around and I like your refactoring a lot!
> 

  Well, I have done a couple of fix on:

  - Detecting class name, using __class__.__name__ work for Python
object coming from the python class 'object' as well, which is nice
since a lot of people use it as base class;

  - I moved all log methods in one class, to get nicer import;

  - I have made runner scripts coming from one class. There is
detection of availables presets and products, and a configuration file
for default values, if it's not the first one available product/preset.
For instance, if you only have funittest.silva as egg in your
environment, you will get silva as default product and preset, and if
you have only have funittest.plone, you will get plone as default, which
is nice;

  - I have started to add the possibility to make test for a
plone product, for instance funittest.plone.myproduct, which will
depend on funittest.plone. In this egg, you will be able to use models
coming from funittest.plone (test for customer products);

  - I made a script to generate HTML documentation (funittest_doc)
about models (not finished yet), which will be nice for people who want
to use funittest, to have a documentation on availables models, instead
of digging in code.

> >    On Unix, I have a post-configuration of the instance, which
> > creates everything in Zope to run the test.
> >
> >    You can for instance select silva has buildout profile (check the
> >  README file), and run buildout on a Unix-like box.
> >
> >    After, set your path to include 'firefox-bin', and you can run:
> >
> >    $ ./bin/funittest --preset silva -p silva -t container
> 
> Right now the port is hard-coded to 8080, which breaks with the
> presets that I usually set up with a port that follows the version
> tested (port 2550 for Plone 2.5.5).
> 
> So I made sure that there are at least the two default profiles for
> Plone 2.5 and Plone 3.0 use port 8080.
> 

  Yes I known that. As well I have to workout out how to run test not
the last version of plone, for instance if you want to make test on
plone 3.0.2.

> For this generic case, I have the files etc/plone3.py and
> etc/plone25.py in funittest now. I renamed plone3.py to plone300.py
> to make place for the generic preset plone3.py.
> 
> Could you take over these changes in your branch please. I would
> have commited the changes in your branch, but I get an svn error.
> (I get a 403 Forbidden)
> 
  Hum, this is strange, since I have created the branch just with a svn
copy, I don't think there is special right management on the SVN. Are
you sure to have made a checkout using an https link, and not an http
(here, you get this error, since nobody can commit with http) ? If
it's the case, you can switch the http to https like this, in your
checkout:

  svn switch --relocate
http://svn.plone.org/svn/collective/funittest/branches/sylvain-eggif
https://svn.plone.org/svn/collective/funittest/branches/sylvain-eggif

  (on the same line, that's my mailer which add line return.)

  This had already happened to me, and I have searched a long time why
I didn't have commit rights to my work ...

> With these small changes, the Plone users will be able to run the
> tests for Plone 2.5 and Plone 3.0 out of the box.
> 
> The solution that I propose here is not getting rid of the hard-coded
> port though. The best approach seems to be to let the buildout
> define the browser url and use the browser url from the buildout
> configuration in the preset in some way:
> 
> interpreter.setBrowserURL(buildoutconfig.browser_url)
> 
> I have no idea right now how to implement this exactly, and would be
> happy about any suggestions.
> 

  Hum, it's not a bad idea. Maybe we can make the buildout generate the
configuration file, the one I have speak above, which can override data
from the preset.
  
  As well, I want to add configuration coming from the file of the
logger (which backend to use, writing where ...).

> Best regards,
> 
> Maik
> 
>

  Sylvain,

Return to date view: threaded or flat