Re: how to get tests passing for Plone 5

Gil Forcada <[email protected]>
Newsgroups gmane.comp.web.zope.plone.devel
Message-ID <1377293794.24484.1.camel@patam>
El dj 22 de 08 de 2013 a les 12:09 -0700, en/na David Glick (Plone) va
escriure:
> Okay, here's the deal with Plone 5: there is a branch started (5.0 
> branch of buildout.coredev) which uses plone.app.contenttypes as the 
> default content type system. But there are a lot of tests which are 
> breaking because they assume that the default content types are 
> Archetypes-based. 
> (http://jenkins.plone.org/job/plone-5.0-python-2.7/lastCompletedBuild/testReport/) 
> I could really use some help getting these fixed.
> 
> A large part of this is making sure that tests are using layers based on 
> the correct fixture. At present the fixtures that we can choose from are:
> 1. PLONE_FIXTURE from plone.app.testing. As of Plone 5 this no longer 
> installs a content type system, so it's only appropriate for tests that 
> don't use content types.
> 2. PLONE_APP_CONTENTTYPES_FIXTURE from plone.app.contenttypes. This 
> extends PLONE_FIXTURE and adds the plone.app.contenttypes profile, 
> adding Dexterity-based core content types. Tests of Dexterity-based 
> content should use this.
> 3. A yet-to-be-created fixture in Products.ATContentTypes that installs 
> Archetypes-based content types like in Plone 4. Tests of 
> Archetypes-based content should use this.
> 4. PloneTestCase. We should really work on converting these tests to use 
> plone.testing-based layers, but in the meantime, the setup for Plone 5 
> has been adjusted to install types from plone.app.contenttypes rather 
> than ATContentTypes. This change is the biggest source of the tests that 
> are currently failing. We can move these tests to a class that uses the 
> Products.ATContentTypes fixture from #3. But we also need to consider:
>    a. Does it test something that should also continue to work with 
> Dexterity content? If so we should keep a second copy of the test in a 
> class using the plone.app.contenttypes fixture.
>    b. Does the failure indicate a problem in Dexterity's compatibility 
> with Archetypes content? If so, rather than changing the test maybe we 
> need to fix something in Dexterity.
> 
> This effort is a work in progress; suggestions of improvements to these 
> guidelines are welcome. If in doubt about what to do for a particular 
> test, talk to me here or on IRC.
> 
> Oh, also, jenkins is showing significantly fewer tests running in the 
> Plone 5 job compared to the Plone 4 jobs. That probably means there are 
> some import errors preventing tests from being discovered, so it would 
> be great if someone could look into that.
> 
> thanks,
> David

Thanks for sharing this!

That's a great way (maybe?) to get contributors up to speed with some
sizable tasks to work on (get a module that its tests are not passing
and make sure they do pass).

A blog post with specific instructions on how to get the thing going and
checking would be even better (wasn't supposed to be more blogging going
on on planet.plone.org :D)

Cheers,
Gil

-- 
Gil Forcada

[ca] guifi.net - una xarxa lliure que no para de créixer
[en] guifi.net - a non-stopping free network
bloc: http://gil.badall.net
planet: http://planet.guifi.net


------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Plone-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plone-developers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.