How to use robot-server and pybot with not fiddling with env variables?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
Research direction
Start with the robot-server and pybot entry points, the fixture that stores the randomly assigned port, and the related issue #99. Compare the documented environment-variable workflow with the proposed default behavior, then determine which approach should be adopted. Done means the separate server and test commands have a documented, reliable way to use the same port.
Written by the indexing model from the issue text.
Description
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:
ZSERVER_PORT=55001 ./bin/robot-server plone.app.robotframework.testing.PLONE_ROBOT_TESTING
and this way to run pybot:
ZSERVER_HOST=localhost ZSERVER_PORT=55001 ./bin/pybot -t '*' src/plone/app/robotframework/tests/test_autologin_library.robot
Pro:
- 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.
- Dominant language
- Python
- Stars
- 3
- Forks
- 9
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from plone/plone.testing
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
plone/plone.testing#103 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
plone/plone.testing#83 · 6 comments ·
All issues in plone/plone.testing
Similar issues
-
area/auth bug comp/agent P3 platform/discord type/security
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
NousResearch/hermes-agent#117848 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100