Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port robot tests #4019

Merged
merged 51 commits into from
Oct 18, 2024
Merged

Port robot tests #4019

merged 51 commits into from
Oct 18, 2024

Conversation

@1letter 1letter linked an issue Oct 7, 2024 that may be closed by this pull request
22 tasks
@mister-roboto
Copy link

@1letter thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

@petschki
Copy link
Member

petschki commented Oct 7, 2024

@gforcada we're almost through with porting CMFPlone robot tests to playwright but right now the rfbrowser init fails on jenkins. We use this with the coredev PR here: plone/buildout.coredev#954 to get the latest versions for robotframework-browser .. the error on the jenkins console says:

2024-10-07 05:27:33,807 [INFO    ] Traceback (most recent call last):
  File "/home/jenkins/.buildout/eggs/cp312/robotframework_browser-17.5.2-py3.12.egg/Browser/entry.py", line 324, in init
    _rfbrowser_init(skip_browsers, silent_mode, with_deps, browser)
  File "/home/jenkins/.buildout/eggs/cp312/robotframework_browser-17.5.2-py3.12.egg/Browser/entry.py", line 131, in _rfbrowser_init
    _check_npm()
  File "/home/jenkins/.buildout/eggs/cp312/robotframework_browser-17.5.2-py3.12.egg/Browser/entry.py", line 123, in _check_npm
    raise exception
  File "/home/jenkins/.buildout/eggs/cp312/robotframework_browser-17.5.2-py3.12.egg/Browser/entry.py", line 111, in _check_npm
    subprocess.run(
  File "/srv/python3.12/lib/python3.12/subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/python3.12/lib/python3.12/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/srv/python3.12/lib/python3.12/subprocess.py", line 1955, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'npm'

do you have an idea how to fix this?

@petschki
Copy link
Member

petschki commented Oct 7, 2024

/cc @mauritsvanrees once this is done, I think we can update the coredev versions again... these playwright tests should be much more stable than the selenium ones.

@1letter
Copy link
Contributor Author

1letter commented Oct 7, 2024

@petschki @mauritsvanrees @datakurre
robodoc ist obsolete, right? Should the entire folder be removed/Products/CMFPlone/tests/robot/robodoc ?

@mauritsvanrees
Copy link
Member

I think they can be removed yes.

@stevepiercy Is the robodoc directory used anywhere in current docs? I don't think so. Apparently it was originally some doctests used for generating screen shots. See its readme.

Looking at the history, the last real commit was from 2018, all commits afterwards look more like search-and-replace through the entire code base.

@gforcada
Copy link
Member

@petschki yes, I think we add/remove things there... but your test was about which branches? 🤔

@petschki
Copy link
Member

petschki commented Oct 13, 2024

@petschki yes, I think we add/remove things there... but your test was about which branches? 🤔

those PRs were tested (see job parameters):

https://github.com/plone/buildout.coredev/pull/954
https://github.com/plone/Products.CMFPlone/pull/4019

So coredev branch in combination with package PR will not work then? EDIT: I'd check for a branch checkout first before changeing the sources.cfg in that case...

@petschki
Copy link
Member

robotframework-browser 18.x version pins are merged in coredev#6.1 and nvm is now activated for all jobs on jenkins. lets see what the tests say.

Copy link
Member

@mauritsvanrees mauritsvanrees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, that is a lot of work. Thanks!
I skimmed through the changes, they seem mostly simplifying tests, removing all kinds of 'wait until' because they are no longer needed, which is good.

Jenkins 3.12 passes. I have started 3.10. Once that is green, I think this is mergeable!

@mauritsvanrees
Copy link
Member

Or do one or more of the Jenkins nodes still need an update?

BTW, node 3 is down currently, "no route to host".

@1letter
Copy link
Contributor Author

1letter commented Oct 18, 2024

@mauritsvanrees sometimes one or two tests fails on jenkins, locally all is fine. it looks like scarce resources on the nodes. but in general, the tests are stable.

@petschki
Copy link
Member

@mauritsvanrees I had a discord session yesterday night with @gforcada where he fixed the jenkins configs to correctly install nvm for every job so this is done. Node 3 unfortunately has resource problems so it is offline regularly ... Node 4 also startet to cancel jobs because of resource problems.

I'm not sure if the resource problems are related to the new rfbrowser setup?

@1letter
Copy link
Contributor Author

1letter commented Oct 18, 2024

@mauritsvanrees
i started the 3.10 again with more parameters

https://github.com/plone/Products.CMFPlone/pull/4019
https://github.com/plone/plone.app.contenttypes/pull/704
https://github.com/plone/plone.app.discussion/pull/214
https://github.com/plone/plone.app.multilingual/pull/460
https://github.com/plone/plone.schemaeditor/pull/118
https://github.com/plone/plone.app.dexterity/pull/394
https://github.com/plone/plone.app.event/pull/409

@petschki
Copy link
Member

I've merged all test-porting PRs and will fix the one failing test here. So no more extra parameters needed!

@petschki
Copy link
Member

@jenkins-plone-org please run jobs

@petschki petschki merged commit a840a70 into master Oct 18, 2024
4 of 6 checks passed
@petschki petschki deleted the port-robot-tests branch October 18, 2024 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port robot framework tests to Playwright
8 participants