Feature #8260

Support for WSGI and Grok testlayer flavours

Added by Jan-Jaap Driessen over 10 years ago. Updated about 9 years ago.

Fix released
Normal (P3)
Target version:
Start date:
Due date:
% Done:


Estimated time:


`tha.selenium` is a package we use at The Health Agency, which adds support for 1) testing grok apps with gocept.selenium and 2) adjusting gocept.selenium behavior through environment variables. I ported the tha.selenium changes to gocept.selenium in the `janjaapdriessen-wsgi` branch in and hope we can integrate these in gocept.selenium:

  • gocept.selenium.wsgi.WSGILayer allows wsgi applications to be tested.
  • gocept.selenium.grok.GrokLayer depends on gocept.selenium.wsgi.WSGILayer and can be used to test grok apps. Grok > 1.2 doesn't depend on any longer, therefore we can not use gocept.selenium.ztk.Layer. Quite possibly, bluebream applications could also be tested with this layer, in which case we should rename it. The GrokLayer depends on the testlayers in and zope.component.
  • in gocept.selenium.base you will find the environment variables that can be used to:

1. locate the selenium server;
2. make the selenium server find the local application;
3. select a browser to run the tests with;
4. control the speed of the selenium tests.

At The Health Agency, we use buildbot and selenium grid to run tests on all common browsers. These environment variables help in setting up the interaction.

There are some caveats and questions that I would like your opinion on:

- There is no switch_db support in gocept.selenium.wsgi.WSGILayer, because we can not know whether the WSGI app is running a database that needs to be switched.

- The switch_db in gocept.selenium.grok.GrokLayer has been moved to the layer's testSetUp.

- Is gocept.selenium in any buildbot? Otherwise, I would like to add it to

- The default value for the APP_HOST is '' in order to help the selenium grid slaves access the local application and because I use firefox on a different machine to dive into a running selenium test. With 'localhost' I can not access the application being tested as easily.

- python2.4 compliance - to what extend do changes to gocept.selenium need to be 2.4 compliant?

If you agree with these changes, I will update the documentation to reflect these changes and prepare a release.


Updated by Wolfgang Schnerring over 10 years ago

  • Subject changed from tha.selenium -> gocept.selenium to Support for WSGI and Grok testlayer flavours
  • Status changed from New to Confirmed

Updated by Wolfgang Schnerring about 10 years ago

  • Status changed from Confirmed to Fix committed
  • % Done changed from 0 to 100

Applied in changeset r118812.


Updated by Thomas Lotze about 9 years ago

  • Status changed from Fix committed to Fix released

Also available in: Atom PDF