Task #3829 (closed)
selenium tests for webadmin
Reported by: | wmoore | Owned by: | wmoore |
---|---|---|---|
Priority: | major | Milestone: | OMERO-Beta4.3 |
Component: | Web | Version: | n.a. |
Keywords: | n.a. | Cc: | cneves, atarkowska |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | 0.0d |
Sprint: | 2011-02-10 (5) |
Description
Test the various pages and functions of webadmin using Selenium tests.
- Test all pages load OK
- Create a group
- Create an Experimenter
- Edit group (name, permissions etc)
- Edit experimenter
- Edit 'My Account'
Change History (13)
comment:1 Changed 13 years ago by wmoore
- Status changed from new to accepted
comment:2 Changed 13 years ago by jburel
- Sprint changed from 2011-01-13 (23) to 2011-01-27 (24)
comment:3 Changed 13 years ago by wmoore
- Status changed from accepted to new
Currently having trouble getting Selenium tests to work...
wjm:Omero will$ omero web seleniumtest webmobile localhost http://localhost:4080 firefox Selenium test... ['/Users/will/Documents/workspace/Omero/dist/lib/python/omeroweb/webmobile/tests/seleniumtests.py', 'localhost', 'http://localhost:4080', 'firefox'] Selenium Result: u'OK,2f69fb7e0fcc4700855dad6fea8b6e23' seleniumbase.py getSelenium: /webtest/ Selenium Result: u'XHR ERROR: URL = http://localhost:4080/webtest/ Response_Code = 500 Error_Message = INTERNAL SERVER ERROR' E ====================================================================== ERROR: testTheTests (__main__.TestBase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/will/Documents/workspace/Omero/dist/lib/python/omeroweb/webgateway/tests/seleniumbase.py", line 140, in setUp self.selenium = self.SERVER.getSelenium() File "/Users/will/Documents/workspace/Omero/dist/lib/python/omeroweb/webgateway/tests/seleniumbase.py", line 72, in getSelenium self.selenium.open("/%s/" % self.base) File "/Users/will/Documents/workspace/Omero/dist/lib/python/selenium.py", line 764, in open self.do_command("open", [url,]) File "/Users/will/Documents/workspace/Omero/dist/lib/python/selenium.py", line 215, in do_command raise Exception, data Exception: XHR ERROR: URL = http://localhost:4080/webtest/ Response_Code = 500 Error_Message = INTERNAL SERVER ERROR ---------------------------------------------------------------------- Ran 1 test in 5.984s FAILED (errors=1)
The problem can be isolated to this code:
>>> from selenium import selenium >>> sel = selenium("localhost", 4444, "firefox", "http://localhost:4080/webtest/") >>> sel.start() >>> sel.open('/') Selenium Result: u'XHR ERROR: URL = http://localhost:4080/ Response_Code = 404 Error_Message = NOT FOUND' Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/will/Documents/workspace/Omero/dist/lib/python/selenium.py", line 764, in open self.do_command("open", [url,]) File "/Users/will/Documents/workspace/Omero/dist/lib/python/selenium.py", line 215, in do_command raise Exception, data Exception: XHR ERROR: URL = http://localhost:4080/ Response_Code = 404 Error_Message = NOT FOUND
See: http://code.google.com/p/selenium/issues/detail?id=408 and http://groups.google.com/group/selenium-users/browse_thread/thread/3f529933b26ce88c/7df57e6c1ff2b2ce?pli=1
comment:4 Changed 13 years ago by wmoore
- Status changed from new to accepted
comment:5 Changed 13 years ago by wmoore
Whoops - that last bit of code was not the right one for demonstrating the problem. This is
>>> from selenium import selenium >>> sel = selenium("localhost", 4444, "firefox", "http://localhost:4080/webtest/") >>> sel.start() >>> sel.open('') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/will/Documents/workspace/Omero/dist/lib/python/selenium.py", line 764, in open self.do_command("open", [url,]) File "/Users/will/Documents/workspace/Omero/dist/lib/python/selenium.py", line 215, in do_command raise Exception, data Exception: XHR ERROR: URL = http://localhost:4080/webtest/ Response_Code = 500 Error_Message = INTERNAL SERVER ERROR
Same with Safari
>>> from selenium import selenium >>> sel = selenium("localhost", 4444, "safari", "http://localhost:4080/webtest/") >>> sel.start() >>> sel.open('') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/will/Documents/workspace/Omero/dist/lib/python/selenium.py", line 764, in open self.do_command("open", [url,]) File "/Users/will/Documents/workspace/Omero/dist/lib/python/selenium.py", line 215, in do_command raise Exception, data Exception: XHR ERROR: URL = http://localhost:4080/webtest/ Response_Code = 500 Error_Message = OK >>>
comment:6 Changed 13 years ago by wmoore
(In [8913/omero]) Committing working test for webmobile as a template for webadmin. See #3829
comment:7 Changed 13 years ago by wmoore
(In [8928/omero]) Webadmin selenium test, first attaempt. See #3829
comment:8 Changed 13 years ago by wmoore
comment:9 Changed 13 years ago by jburel
- Sprint changed from 2011-01-27 (4) to 2011-02-10 (5)
Moved from sprint 2011-01-27 (4)
comment:10 Changed 13 years ago by Will Moore <will@…>
- Remaining Time set to 0
- Resolution set to fixed
- Status changed from accepted to closed
(In [4bdbad151457e6306b890254b623267cfa7f987b/ome.git]) Final edit to webadmin selenium tests for now. Need info on how to setup DB and other feedback. Closes #3829
comment:11 Changed 13 years ago by Will Moore <will@…>
(In [289c957aff949faa186933c16f99cb6e0f689a9a/ome.git] on branch develop) Moving createGroup and createExperimenter to helper functions in webadmin seleniumtests. See #3829
comment:12 Changed 13 years ago by Will Moore <will@…>
(In [212a909f5d8058bdaa14571834201d09f3bb3c57/ome.git] on branch develop) Selenium testRemoveExpFromGroup now does what it says but bug in webadmin - fails. See #3829
comment:13 Changed 13 years ago by Will Moore <will@…>
(In [4bdbad151457e6306b890254b623267cfa7f987b/ome.git]on branches master, develop, feature/5252-import-cancel, fix/4463, python-gateway) Final edit to webadmin selenium tests for now. Need info on how to setup DB and other feedback. Closes #3829
Moved from sprint 2011-01-13 (23)