Running robot tests for Products.CMFPlone

Hi,

I want to run a robot test for a review on Products.CMFPlone. I'm using buildouts.coredev (6.x) for this and only want the check robot tests. I do the following:

ROBOT_BROWSER=firefox DISPLAY=:0 ./bin/test -s Products.CMFPlone --tests-pattern "test_robot"

It does not run the tests even though test_robot.py gets processed (set a breakpoint there to confirm).

Output is as follows (I removed the noisy deprecation warnings):

Running Products.CMFPlone.testing.CMFPloneLayer:Integration tests:
  Set up plone.testing.zca.LayerCleanup in 0.000 seconds.
  Set up plone.testing.zope.Startup 
in 0.352 seconds.
  Set up plone.app.testing.layers.PloneFixture 
in 8.278 seconds.
  Set up plone.app.contenttypes.testing.PloneAppContenttypes in 0.046 seconds.
  Set up Products.CMFPlone.testing.ProductsCMFPloneLayer in 0.360 seconds.
  Set up Products.CMFPlone.testing.CMFPloneLayer:Integration in 0.000 seconds.
  Running:                
  Ran 1 tests with 0 failures, 0 errors, 0 skipped in 0.024 seconds.
Tearing down left over layers:
  Tear down Products.CMFPlone.testing.CMFPloneLayer:Integration in 0.000 seconds.
  Tear down Products.CMFPlone.testing.ProductsCMFPloneLayer in 0.083 seconds.
  Tear down plone.app.contenttypes.testing.PloneAppContenttypes in 0.003 seconds.
  Tear down plone.app.testing.layers.PloneFixture in 0.138 seconds.
  Tear down plone.testing.zope.Startup in 0.017 seconds.
  Tear down plone.testing.zca.LayerCleanup in 0.001 seconds.

It runs in ~10s which would be hella fast for robot tests. Hence my doubts if it really runs through... :slight_smile: Also neither --lists-tests does print out the robot tests.

I think I'm missing something obvious here.

best, Paul

in a coredev buildout i run this commands:

first init the rfbrowser

bin/rfbrowser init chromium

and then for a single test from a package

ROBOT_BROWSER=chromium bin/test --all -s Products.CMFPlone -t test_contentbrowser.robot
1 Like

Thank you @1letter. Works like a charm now. I just had to ensure I'm using a higher node version (currently v22.12.0) and I also manually installed playwright:

npm install @playwright/test
npx playwright install

The documentation was recently updated with possibly relevant information.

If something is missing and should be added, I'd gladly accept an issue or PR.