plone / plone.app.robotframework

Provides Robot Framework compatible resources and tools for writing functional Selenium tests (including acceptance tests) for Plone CMS and its add-ons.
https://docs.plone.org/external/plone.app.robotframework/docs/source/index.html
11 stars 17 forks source link

port plone.app.robotframework to python 3 #80

Closed pbauer closed 6 years ago

pbauer commented 6 years ago

plone.app.robotframework does not run in Python 3 at all. It needs to be migrated.

davisagli commented 6 years ago

The request to get the keywords from /RobotRemote is failing with this traceback:

Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 128, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 270, in publish_module
  Module ZPublisher.WSGIPublisher, line 182, in publish
  Module ZPublisher.HTTPRequest, line 508, in processInputs
  Module cgi, line 561, in __init__
  Module cgi, line 740, in read_single
  Module cgi, line 762, in read_binary
TypeError: write() argument must be str, not bytes
davisagli commented 6 years ago

I think that is from this bug in Python: https://bugs.python.org/issue27777

Once we have a workaround for that, our next roadblock is going to be that Zope 4 doesn't support xmlrpc unless you're using ZServer. 😭

datakurre commented 6 years ago

Ouch. The intent of RobotRemot is to provide native Python implemented keywords for Robot Framework based Selenium test to eg. allow of building test content fast before actual browser tests. XMLRPC was chosen, because Robot Framework had built-in support for it.

In theory it would be possible to implement non-xmlrpc-replacement for RF RemoteLibrary, but that would be a lot of work :/

Next week I have a few day to take a look into asyncio based zserver replacement. At least I should get an idea how big task that would be (our use cases need it).

davisagli commented 6 years ago

I took a quick look and there's not a lot of code in ZServer.ZPublisher.xmlrpc. Maybe we can make an argument for including it in Zope after all; after all it is more about publishing than about the server. Or if Zope doesn't want it, maybe we can load our own copy into the right place in sys.modules so that the ZPublisher will find and use it.

asyncio-based zserver replacement == guillotina ;-p

davisagli commented 6 years ago

Fixed in https://github.com/zopefoundation/Zope/pull/290 and https://github.com/plone/plone.app.robotframework/pull/82

jensens commented 6 years ago

note: