Has anybody managed to marry ZopeTestCase (and the ZopeLite running database) with Selenium RC? I like Selenium but it's a pain to have to manually create a fixture and tear it down again. Would it be possible to kick start Selenium RC from within the testrunner on zope2? -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com
--On 20. März 2008 12:50:48 +0000 Peter Bengtsson <peter@fry-it.com> wrote:
Has anybody managed to marry ZopeTestCase (and the ZopeLite running database) with Selenium RC? I like Selenium but it's a pain to have to manually create a fixture and tear it down again. Would it be possible to kick start Selenium RC from within the testrunner on zope2?
I have no idea how Selenium and ZTC would be related - neither in general nor in this particular case. Andreas
Andreas Jung wrote:
--On 20. März 2008 12:50:48 +0000 Peter Bengtsson <peter@fry-it.com> wrote:
Has anybody managed to marry ZopeTestCase (and the ZopeLite running database) with Selenium RC? I like Selenium but it's a pain to have to manually create a fixture and tear it down again. Would it be possible to kick start Selenium RC from within the testrunner on zope2?
I have no idea how Selenium and ZTC would be related - neither in general nor in this particular case.
I don't know how/if the zope testrunner starts a server that can be reached with a browser or not. If it does start a server that can be used in Firefox I'd be able to run som Selenium scripts (Remote Controlled or manually) and when I'm happy with the browser stuff I'd stop the testrunner which would reset the database/zodb again. Basically, having to manually create a fixture for running Selenium scripts is a bore. There's got to be an easier way. -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com
--On 20. März 2008 14:24:57 +0000 Peter Bengtsson <peter@fry-it.com> wrote:
Andreas Jung wrote:
--On 20. März 2008 12:50:48 +0000 Peter Bengtsson <peter@fry-it.com> wrote:
Has anybody managed to marry ZopeTestCase (and the ZopeLite running database) with Selenium RC? I like Selenium but it's a pain to have to manually create a fixture and tear it down again. Would it be possible to kick start Selenium RC from within the testrunner on zope2?
I have no idea how Selenium and ZTC would be related - neither in general nor in this particular case.
I don't know how/if the zope testrunner starts a server that can be reached with a browser or not.
ZTC won't start any servers. -aj
Andreas Jung wrote:
--On 20. März 2008 14:24:57 +0000 Peter Bengtsson <peter@fry-it.com> wrote:
Andreas Jung wrote:
--On 20. März 2008 12:50:48 +0000 Peter Bengtsson <peter@fry-it.com> wrote:
Has anybody managed to marry ZopeTestCase (and the ZopeLite running database) with Selenium RC? I like Selenium but it's a pain to have to manually create a fixture and tear it down again. Would it be possible to kick start Selenium RC from within the testrunner on zope2?
I have no idea how Selenium and ZTC would be related - neither in general nor in this particular case.
I don't know how/if the zope testrunner starts a server that can be reached with a browser or not.
ZTC won't start any servers.
What are my options then other than manually creating the fixtures? -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com
--On 20. März 2008 14:37:56 +0000 Peter Bengtsson <peter@fry-it.com> wrote:
Andreas Jung wrote:
--On 20. März 2008 14:24:57 +0000 Peter Bengtsson <peter@fry-it.com> wrote:
Andreas Jung wrote:
--On 20. März 2008 12:50:48 +0000 Peter Bengtsson <peter@fry-it.com> wrote:
Has anybody managed to marry ZopeTestCase (and the ZopeLite running database) with Selenium RC? I like Selenium but it's a pain to have to manually create a fixture and tear it down again. Would it be possible to kick start Selenium RC from within the testrunner on zope2?
I have no idea how Selenium and ZTC would be related - neither in general nor in this particular case.
I don't know how/if the zope testrunner starts a server that can be reached with a browser or not.
ZTC won't start any servers.
What are my options then other than manually creating the fixtures?
If you have an existing fixture for ZTC, you might refactor it somehow in order to setup a new instance with your fixture using "zopectl run ..." before starting the Zope process for the Selenium testrunner. -aj
You can tell ZTC to start a server by calling ZopeTestCase.utils.startZServer() Stefan On 20.03.2008, at 15:24, Peter Bengtsson wrote:
I don't know how/if the zope testrunner starts a server that can be reached with a browser or not.
-- Stefan H. Holek stefan@epy.co.at
Peter Bengtsson wrote:
I don't know how/if the zope testrunner starts a server that can be reached with a browser or not. If it does start a server that can be used in Firefox I'd be able to run som Selenium scripts (Remote Controlled or manually) and when I'm happy with the browser stuff I'd stop the testrunner which would reset the database/zodb again.
When I need to do testing like this, I keep the start/stop of the app server seperate from the tests that are running against them. If I ever wanted to automate, I'd do something like: #!/bin/bash zopectl start python2.4 mytests.py zopectl stop I've also found zope.testrunner to be much more amenable for this kind of thing than fiddling with Selenium. (I actually combine zope.testing with zope.testrunner and so use zope.testing layers in order to re-use slow components, like setting up a Plohn site) cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
participants (4)
-
Andreas Jung -
Chris Withers -
Peter Bengtsson -
Stefan H. Holek