[Zope] ZopeTestCase and Selenium RC? Anybody?

2008-03-20 Thread Peter Bengtsson
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
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZopeTestCase and Selenium RC? Anybody?

2008-03-20 Thread Andreas Jung



--On 20. März 2008 12:50:48 + Peter Bengtsson [EMAIL PROTECTED] 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

pgpnbQ9EFzxlI.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZopeTestCase and Selenium RC? Anybody?

2008-03-20 Thread Peter Bengtsson



Andreas Jung wrote:



--On 20. März 2008 12:50:48 + Peter Bengtsson [EMAIL PROTECTED] 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
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZopeTestCase and Selenium RC? Anybody?

2008-03-20 Thread Andreas Jung



--On 20. März 2008 14:24:57 + Peter Bengtsson [EMAIL PROTECTED] wrote:




Andreas Jung wrote:



--On 20. März 2008 12:50:48 + Peter Bengtsson [EMAIL PROTECTED]
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

pgpmMj4Q5baM4.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZopeTestCase and Selenium RC? Anybody?

2008-03-20 Thread Peter Bengtsson



Andreas Jung wrote:



--On 20. März 2008 14:24:57 + Peter Bengtsson [EMAIL PROTECTED] wrote:




Andreas Jung wrote:



--On 20. März 2008 12:50:48 + Peter Bengtsson [EMAIL PROTECTED]
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
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZopeTestCase and Selenium RC? Anybody?

2008-03-20 Thread Andreas Jung



--On 20. März 2008 14:37:56 + Peter Bengtsson [EMAIL PROTECTED] wrote:




Andreas Jung wrote:



--On 20. März 2008 14:24:57 + Peter Bengtsson [EMAIL PROTECTED]
wrote:




Andreas Jung wrote:



--On 20. März 2008 12:50:48 + Peter Bengtsson [EMAIL PROTECTED]
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

pgpQb2mfbFXiB.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZopeTestCase and Selenium RC? Anybody?

2008-03-20 Thread Stefan H. Holek
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
[EMAIL PROTECTED]




___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZopeTestCase and Selenium RC? Anybody?

2008-03-20 Thread Chris Withers

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
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )