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

Add TEST_SCOPE_WSGI_SERVER_FIXTURE and use it in PLONE_ROBOT_TESTING … #131

Closed datakurre closed 2 years ago

datakurre commented 2 years ago

…layer (used by Volto Cypress tests

mister-roboto commented 2 years ago

@datakurre 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!

sneridagh commented 2 years ago

I just tested it and locally seems to work well. Of course, I have no means to "slow down" the processing to match the GHA runners pace. I just restarted the failing test. I will try to test this in a PR.

datakurre commented 2 years ago

Good to know test passed on second run. I could not find clear reason for the possible regression. WSGI shutdown should not affect the db.

sneridagh commented 2 years ago

Four runs, and all passed. Certainly this made impact on the test run. I'd say let's merge the other PR and this one, release p.a.robotframework.

For the record: https://github.com/plone/volto/runs/6335283483?check_suite_focus=true

mauritsvanrees commented 2 years ago

@sneridagh I have merged the two branches. Can you check if it works now? I hope I did not misinterpret some things.

In your Volto PR, the DockerfileRF should use p.a.robotframework master. And you should use the new layer VOLTO_ROBOT_TESTING.

sneridagh commented 2 years ago

OK! I think Asko wanted to fiddle a bit more with this one, but don't worry, we can open another PR for continue fiddling with it. The changes seemed already giving good vibrations.

Could we have another alpha release so we can test it in Volto?

Thanks!!

sneridagh commented 2 years ago

Regarding the DockerfileRF, I will take care of it and cleaning up after we end with the tests.

mauritsvanrees commented 2 years ago

I have released plone.app.robotframework 2.0.0a4.

sneridagh commented 2 years ago

Thanks!

datakurre commented 2 years ago

@mauritsvanrees I am sorry, but this was not yet ready :(

I though "in progress" label would have messaged that.

The merged version introduced unnecessary logging, but maybe that's not so harmful.

sneridagh commented 2 years ago

@datakurre Not a big deal!

What about this:

datakurre commented 2 years ago

@sneridagh @mauritsvanrees Now that I saw what was merged, no reason to panic.

This pull was not complete, because it did not really fix the issue in Volto yet. But thanks to the other merge, this only introduced the new layer only into a new VOLTO_ROBOT_TESTING.

So, @sneridagh could now work to change Volto core to use plone.app.robotframework.testing.VOLTO_ROBOT_TESTING. It does not fix the issue, but should not any new issues either.

Becase PLONE_ROBOT_TESTING fixture was left untouched, merging this pull should have had no regression.

datakurre commented 2 years ago

Need to add one more comment just to praise all the work @mauritsvanrees does for Plone releases :rocket:

sneridagh commented 2 years ago

@datakurre I will! let me know if you create another PR in here, so I will update the PR we were working on as well.

mauritsvanrees commented 2 years ago

Sorry, I merged too soon apparently. I don't think there is any harm in the currently released version though. Happy to do another release when needed.