Provides tools for writing unit and integration tests in a Zope and Plone environment. It is not tied to Plone, and it does not depend on Zope 2 (although it has some optional Zope 2-only features)
While this is very good for normal testing this breaks the workflow of people that were using the robot-server script to run the server and the pybot script to run the tests.
The reason is that the two scripts are run separately and there is no simple way for the pybot script to know which port the robot server is using.
We can solve this issue in many way:
Force everybody to set the relevant environment variables
For example we can change the documentation to suggest this way of running the server:
We do not touch plone.testing, no action needed by the testing team
Con:
It is not really friendly and KISS compliant
We need to update the documentation
Restore the previous defaults unless some variable is set to force the random ports.
We could yet another environment variable and change the default for the port from 55001 to 0 only if ZSERVER_USE_RANDOM_PORT is truish.
Or we can just ZSERVER_PORT=0.
Pro:
We restore a well documented behavior
Con:
We need to change again plone.testing
Maybe yet another variable is needed (there are already many)
The jenkins job needs to take care of setting that variable before running the tests
I personally prefer this second approach because it seems more natural to me.
After #51 the robot server starts on a random port and that port is stored on the fixture.
Related issue:
While this is very good for normal testing this breaks the workflow of people that were using the robot-server script to run the server and the pybot script to run the tests.
The reason is that the two scripts are run separately and there is no simple way for the pybot script to know which port the robot server is using.
We can solve this issue in many way:
Force everybody to set the relevant environment variables
For example we can change the documentation to suggest this way of running the server:
and this way to run pybot:
Pro:
Con:
Restore the previous defaults unless some variable is set to force the random ports.
We could yet another environment variable and change the default for the port from 55001 to 0 only if ZSERVER_USE_RANDOM_PORT is truish. Or we can just ZSERVER_PORT=0.
Pro:
Con:
I personally prefer this second approach because it seems more natural to me.