SST tests are failing-First time user

Asked by Raghavendra on 2012-02-29

Hi,

Followed the Readme and installed sst, but all my tests are failing
Using
Python 2.7.2+
Ubuntu 11.1

Console trace:

./sst-run --test
----------------------------------------------------------------------
starting SST...
----------------------------------------------------------------------
waiting for django to come up...
django found. continuing...

  date time: 2012-02-29 18:10
  test directory: 'selftests'
  report format: 'console'
  browser type: 'Firefox'
  javascript disabled: False
  browswermob proxy launcher: None
  shared directory: None
  screenshots on error: False
  failfast: False
  debug: False
  headless xserver: False

Specified directory '/usr/local/lib/python2.7/dist-packages/sst-0.2.0-py2.7.egg/sst/selftests' does not exist
raghavendra@raghavendra:~/selenium-simple-test$ ^M
raghavendra@raghavendra:~/selenium-simple-test$
raghavendra@raghavendra:~/selenium-simple-test$
raghavendra@raghavendra:~/selenium-simple-test$ ./sst-run -d examples
----------------------------------------------------------------------
starting SST...

  date time: 2012-02-29 18:10
  test directory: 'examples'
  report format: 'console'
  browser type: 'Firefox'
  javascript disabled: False
  browswermob proxy launcher: None
  shared directory: None
  screenshots on error: False
  failfast: False
  debug: False
  headless xserver: False

  3 test cases loaded

----------------------------------------------------------------------
test_seleniumhq (sst.runtests.TestSeleniumhq) ...
    Starting Firefox
    Going to... http://seleniumhq.org/
    Waiting for get_element
FAIL
    Stopping browser
test_googlefinance (sst.runtests.TestGooglefinance) ...
    Starting Firefox
    Setting base url to: 'http://www.google.com/'
    Going to... http://www.google.com/
    Waiting for get_element
FAIL
    Stopping browser
test_yahoofinance (sst.runtests.TestYahoofinance) ...
    Starting Firefox
    Going to... http://finance.search.yahoo.com/
    Waiting for get_element
FAIL
    Stopping browser

======================================================================
FAIL: test_seleniumhq (sst.runtests.TestSeleniumhq)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/sst-0.2.0-py2.7.egg/sst/runtests.py", line 273, in test
    exec self.code in context
  File "/home/raghavendra/selenium-simple-test/examples/seleniumhq.py", line 3, in <module>
    go_to('http://seleniumhq.org/')
  File "/usr/local/lib/python2.7/dist-packages/sst-0.2.0-py2.7.egg/sst/actions.py", line 335, in go_to
    _waitforbody()
  File "/usr/local/lib/python2.7/dist-packages/sst-0.2.0-py2.7.egg/sst/actions.py", line 1062, in _waitforbody
    wait_for(get_element, tag='body')
  File "/usr/local/lib/python2.7/dist-packages/sst-0.2.0-py2.7.egg/sst/actions.py", line 700, in wait_for
    _raise(error)
  File "/usr/local/lib/python2.7/dist-packages/sst-0.2.0-py2.7.egg/sst/actions.py", line 108, in _raise
    raise AssertionError(msg)
AssertionError: Timed out waiting for: get_element
Error during wait: Could not identify elements: 0 elements found

======================================================================
FAIL: test_googlefinance (sst.runtests.TestGooglefinance)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/sst-0.2.0-py2.7.egg/sst/runtests.py", line 273, in test
    exec self.code in context
  File "/home/raghavendra/selenium-simple-test/examples/googlefinance.py", line 6, in <module>
    go_to('/')
  File "/usr/local/lib/python2.7/dist-packages/sst-0.2.0-py2.7.egg/sst/actions.py", line 335, in go_to
    _waitforbody()
  File "/usr/local/lib/python2.7/dist-packages/sst-0.2.0-py2.7.egg/sst/actions.py", line 1062, in _waitforbody
    wait_for(get_element, tag='body')
  File "/usr/local/lib/python2.7/dist-packages/sst-0.2.0-py2.7.egg/sst/actions.py", line 700, in wait_for
    _raise(error)
  File "/usr/local/lib/python2.7/dist-packages/sst-0.2.0-py2.7.egg/sst/actions.py", line 108, in _raise
    raise AssertionError(msg)
AssertionError: Timed out waiting for: get_element
Error during wait: Could not identify elements: 0 elements found

======================================================================
FAIL: test_yahoofinance (sst.runtests.TestYahoofinance)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/sst-0.2.0-py2.7.egg/sst/runtests.py", line 273, in test
    exec self.code in context
  File "/home/raghavendra/selenium-simple-test/examples/yahoofinance.py", line 4, in <module>
    go_to('http://finance.search.yahoo.com/')
  File "/usr/local/lib/python2.7/dist-packages/sst-0.2.0-py2.7.egg/sst/actions.py", line 335, in go_to
    _waitforbody()
  File "/usr/local/lib/python2.7/dist-packages/sst-0.2.0-py2.7.egg/sst/actions.py", line 1062, in _waitforbody
    wait_for(get_element, tag='body')
  File "/usr/local/lib/python2.7/dist-packages/sst-0.2.0-py2.7.egg/sst/actions.py", line 700, in wait_for
    _raise(error)
  File "/usr/local/lib/python2.7/dist-packages/sst-0.2.0-py2.7.egg/sst/actions.py", line 108, in _raise
    raise AssertionError(msg)
AssertionError: Timed out waiting for: get_element
Error during wait: Could not identify elements: 0 elements found

----------------------------------------------------------------------
Ran 3 tests in 40.511s

FAILED (failures=3)
----------------------------------------------------------------------

Question information

Language:
English Edit question
Status:
Answered
For:
selenium-simple-test Edit question
Assignee:
No assignee Edit question
Last query:
2012-02-29
Last reply:
2012-02-29
Corey Goldberg (coreygoldberg) said : #1

Hi.

the self-tests and examples need to be run from the package source, not the installed version. I think you are having a conflict where you have SST "installed" but are also trying to run selftests.

try this:
1) uninstall sst (pip uninstall sst) - this is important
2) download sst source package from: http://pypi.python.org/pypi/sst#downloads
3) unarchive, and run self-tests or examples from within the directory it creates

to install and use sst, you can then do:
pip install -U sst.

sorry if the docs were not clear.

regards,
-Corey

Can you help with this problem?

Provide an answer of your own, or ask Raghavendra for more information if necessary.

To post a message you must log in.