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 *Execute:
go_to( "http://www.ubuntu.com" )
assert_title_contains( "Homepage | Ubuntu" )
[ewer@solewer:~/tmp]$sst-run -b Firefox -d mytest/This opens a firefox windows, executes the task and shows the test.
----------------------------------------------------------------------
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]$
0 comments:
Post a Comment