Comment 1 for bug 143738

Revision history for this message
Philipp von Weitershausen (philikon) wrote :

We can't really support 'ftests' packages in Zope 2 right now. The reason is that Zope 2 includes many Zope 3 packages that have 'ftests' packages which contain Zope 3 functional tests (e.g. zope.testbrowser or zope.formlib). These tests can't possibly run on Zope 2, at least not as it exists today. For starters, Zope 2 is missing ftesting.zcml and probably a lot more basic infrastructure that is just there in Zope 3.

The 'tests' vs. 'ftests' convention has served us well so far in Zope 2. Zope 2 simply ignores 'ftests' while Zope 3 runs them. The fact that functional tests are contained in 'ftests' is arbitrary by now, but the convention is so that Zope 2 won't be bothered with Zope 3's functional tests. Hence, Plone shouldn't really use the 'ftests' package...

Here are some possible long-term solutions:

1. We leave everything as it is. Zope 3 style functional tests will be put in 'ftests'. Zope 2 can never use 'ftests' because it would break otherwise.

2. We add a way to let the testrunner know that certain test layer's aren't supported. Basically, we could make it so that an exception raised during layer setup will cause the tests in that layer not to be executed (currently the exception raises all the way to the top and will cause the test runner to terminate at that point)

3. We let Zope 2 grow everything it needs to run Zope 3 functional tests. This could quite possibly work. While this is contra-zope.app-should-not-ship-with-Zope2, it is sort of pro-Zope5 (unifying the two platforms a bit more). Of course, we'll at some point want functional tests in Zoep 2/Five as well, so there's good reason for making them work in Zope 2. For that, it'd be good if functional tests for Zope 2 and 3 would be similar enough that test cases could be run on either platform. I presume this could take a while, though.