Project

General

Profile

Feature #8260

Support for WSGI and Grok testlayer flavours

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

Status:
Fix released
Priority:
Normal (P3)
Assignee:
-
Category:
-
Target version:
-
Start date:
2010-11-09
Due date:
% Done:

100%

Estimated time:
Keywords:

Description

`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 svn.zope.org 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 zope.app.testing 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 zope.app.appsetup 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 http://dev.thehealthagency.com/buildbot

- The default value for the APP_HOST is '0.0.0.0' 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.

Associated revisions

Revision 165:3422121bcbf0 (diff)
Added by Wolfgang Schnerring over 9 years ago

Merge janjaapdriessen-wsgi branch

  • Fixes #8260: Provide integration with the recent testlayer approach
    (zope.app.appsetup/zope.app.wsgi) used by Grok.
  • Fixes #6484: Make browser and RC server configurable.

History

#1 Updated by Wolfgang Schnerring over 9 years ago

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

#2 Updated by Wolfgang Schnerring over 9 years ago

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

Applied in changeset r118812.

#3 Updated by Thomas Lotze over 8 years ago

  • Status changed from Fix committed to Fix released

Also available in: Atom PDF