Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #3829 (closed)

Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

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 9 years ago by wmoore

  • Status changed from new to accepted

comment:2 Changed 9 years ago by jburel

  • Sprint changed from 2011-01-13 (23) to 2011-01-27 (24)

Moved from sprint 2011-01-13 (23)

comment:3 Changed 9 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

Last edited 9 years ago by wmoore (previous) (diff)

comment:4 Changed 9 years ago by wmoore

  • Status changed from new to accepted

comment:5 Changed 9 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
>>> 
Last edited 9 years ago by wmoore (previous) (diff)

comment:6 Changed 9 years ago by wmoore

(In [8913/omero]) Committing working test for webmobile as a template for webadmin. See #3829

comment:7 Changed 9 years ago by wmoore

(In [8928/omero]) Webadmin selenium test, first attaempt. See #3829

comment:9 Changed 9 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 9 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 9 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 9 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 8 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

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.82657 sec.)

We're Hiring!