Jan 4, 2012

Browser Testframework SST using Selenium

For longer time I know about Selenium, which supports multiple language
to create testcases.
Some days ago, I found a link about SST -
SST - Web Test Framework

in the following blogpost from Corey Goldberg
This allows to simplify the testing, which are processed as
unit tests.

A simple example:
mytest/a.py: 
from sst.actions import *

go_to( "http://www.ubuntu.com" )
assert_title_contains( "Homepage | Ubuntu" )
Execute:
[ewer@solewer:~/tmp]$sst-run -b Firefox -d mytest/
----------------------------------------------------------------------
starting SST...

  date time: 2012-01-04 11:46
  test directory: 'mytest/'
  report format: 'console'
  browser type: 'Firefox'
  javascript disabled: False
  shared directory: None
  screenshots on error: False
  failfast: False
  debug: False
  headless xserver: False


  1 test cases loaded

----------------------------------------------------------------------
test_a (sst.runtests.TestA) ...    
    Starting Firefox:
    Going to... http://www.ubuntu.com
    Waiting for get_element
    Stopping browser
ok

----------------------------------------------------------------------
Ran 1 test in 4.885s

OK
----------------------------------------------------------------------
[ewer@solewer:~/tmp]$
This opens a firefox windows, executes the task and shows the test.