我今天早上刚开始看海温。我编写了这个简单的测试用例,它总是通过:
from sst.actions import *
from sst import cases
class RootTest(cases.SSTTestCase):
def test_root_page(self):
go_to('http://localhost:8888/')
assert_title_contains('Booga')
assert_button("file_select")
assert_button("upload")
return self
class LoginTest(cases.SSTTestCase):
def login(self):
go_to('http://localhost:8888/login')
assert_element(id="Email")
assert_element(id="Passwd")
assert_element(id="booga")
return self 我的代码里没有布加。
当我运行sst_test时,我得到以下信息:
Tests running...
DEBUG:SST:Starting browser (attempt: 1)
DEBUG:SST:Cannot connect to process 5392 with port: 32773, count 1
DEBUG:SST:Cannot connect to process 5392 with port: 32773, count 2
DEBUG:SST:Browser started: firefox
DEBUG:SST:Stopping browser
sst_test ... OK (2.317 secs)
Ran 1 test in 2.317s
OK它是一个ubuntu12.04系统,具有py 2.7.3。为什么测试没有失败?
发布于 2013-09-11 15:01:48
你需要使用你自己的跑步者。sst-run只用于运行SST的基于脚本的测试。
请参阅:http://testutils.org/sst/#using-sst-in-unittest-test-suites
https://stackoverflow.com/questions/18744140
复制相似问题