User Story #3299 (closed)
Opened 13 years ago
Closed 13 years ago
Selenium web tests
Reported by: | wmoore | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | OMERO-Beta4.3 |
Component: | Web | Keywords: | n.a. |
Cc: | cneves, atarkowska | Story Points: | n.a. |
Sprint: | n.a. | Importance: | n.a. |
Total Remaining Time: | 0.0d | Estimated Remaining Time: | n.a. |
Description (last modified by wmoore)
Write Selenium tests for web, aiming for as much coverage as possible!
To get started running tests locally, download Selenium RC from http://seleniumhq.org/download/ unzip and run
$ cd Desktop/selenium-remote-control-1.0.3/selenium-server-1.0.3/ $ java -jar selenium-server.jar
You need to set up ice.config and various Python paths. This setup (below) works for running OmeroPy unit tests and seems to work for Selenium too.
Put ice.config in components/tools/OmeroPy
omero.host=localhost omero.port=4064 omero.user=root omero.pass=omero omero.rootpass=omero
Go to components/tools/OmeroPy and do:
export PYTHONPATH=`pwd`/build/lib:`pwd`/test:$PYTHONPATH export HDF5_DISABLE_VERSION_CHECK=2 export ICE_CONFIG=`pwd`/ice.config
Then run tests:
E.g. to run the webadmin test
(at omeroweb/webadmin/tests/seleniumtests.py with Selenium server at 'localhost' and the OMERO web pages available at localhost:4080 using firefox:
$ bin/omero web seleniumtest webadmin localhost http://localhost:4080 firefox
Change History (6)
comment:1 Changed 13 years ago by wmoore
comment:2 Changed 13 years ago by wmoore
- Description modified (diff)
comment:3 Changed 13 years ago by agilo
- Status changed from new to accepted
Updated status, related task in progress
comment:4 Changed 13 years ago by wmoore
I have to make the following modification to avoid the selenium bug described in #3829
--- a/components/tools/OmeroWeb/omeroweb/webgateway/tests/seleniumbase.py +++ b/components/tools/OmeroWeb/omeroweb/webgateway/tests/seleniumbase.py @@ -68,7 +68,7 @@ class SeleniumTestServer (object): pass self.selenium = selenium(self.host, self.port, self.browser, self.url) self.selenium.start() - self.selenium.open("/%s/" % self.base) + self.selenium.open("/%s" % self.base) script = urllib2.urlopen("%s/appmedia/webgateway/js/3rdparty/jquery-1.3.2.js" % (self.url)) r = script.read() self.selenium.run_script(r)
comment:5 Changed 13 years ago by wmoore
- Description modified (diff)
comment:6 Changed 13 years ago by wmoore
- Resolution set to fixed
- Status changed from accepted to closed
(In [8893/omero]) Fixes to the web plugin to get selenium testing to work. See #3299