首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Python SST测试永远不会失败

Python SST测试永远不会失败
EN

Stack Overflow用户
提问于 2013-09-11 14:36:34
回答 1查看 408关注 0票数 0

我今天早上刚开始看海温。我编写了这个简单的测试用例,它总是通过:

代码语言:javascript
复制
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时,我得到以下信息:

代码语言:javascript
复制
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。为什么测试没有失败?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-09-11 15:01:48

你需要使用你自己的跑步者。sst-run只用于运行SST的基于脚本的测试。

请参阅:http://testutils.org/sst/#using-sst-in-unittest-test-suites

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18744140

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档