当前位置: 首页 > news >正文

郑州市建设工程造价信息网站关于工程项目建设的网站

郑州市建设工程造价信息网站,关于工程项目建设的网站,一个品牌的策划方案,网站备案是域名备案还是服务器备案pyse 更名为 seldom WebUI automation testing framework based on Selenium and unittest. 基于 selenium 和 unittest 的 Web UI自动化测试框架。 特点 提供更加简单API编写自动化测试。提供脚手架#xff0c;快速生成自动化测试项目。自动生成HTML测试报告生成。自带断言方… pyse 更名为 seldom WebUI automation testing framework based on Selenium and unittest. 基于 selenium 和 unittest 的 Web UI自动化测试框架。 特点 提供更加简单API编写自动化测试。提供脚手架快速生成自动化测试项目。自动生成HTML测试报告生成。自带断言方法断言title、URL 和 text。支持用例参数化。支持用例失败重跑。用例失败/错误截图。 安装 pip install seldom If you want to keep up with the latest version, you can install with github repository url: pip install -U githttps://github.com/defnngj/seldom.gitmaster Quick Start 1、查看帮助 seldom -h usage: seldom [-h] [-V] [--startproject STARTPROJECT] [-r R]WebUI automation testing framework based on Selenium.optional arguments:-h, --help show this help message and exit-V, --version show version--startproject STARTPROJECTSpecify new project name.-r R run test case 2、创建项目 seldom --startproject mypro 3、目录结构 mypro/ ├── test_dir/ │ ├── test_sample.py ├── report/ └── run.py test_dir/目录实现用例编写。report/ 目录存放生成的测试报告。run.py 文件运行测试用例。 3、运行项目 seldom -r run.py Python 3.7.1 _ _| | | |___ ___ | | __| | ___ _ __ ___ / __| / _ \| | / _ | / _ \ | _ _ \ \__ \| __/| || (_| || (_) || | | | | | |___/ \___||_| \__,_| \___/ |_| |_| |_| -----------------------------------------itest.infogenerated html file: file:///D:\mypro\reports\2019_11_12_22_28_53_result.html .1 4、查看报告 你可以到 mypro\reports\ 目录查看测试报告。 API Documents simple demo 请查看 demo/test_sample.py 文件 import seldomclass YouTest(seldom.TestCase):def test_case(self):a simple test case self.open(https://www.baidu.com)self.type(id_kw, textseldom)self.click(css#su)self.assertTitle(seldom)if __name__ __main__:seldom.main(test_sample.py)说明 创建测试类必须继承 seldom.TestCase。测试用例文件命名必须以 test 开头。seldom的封装了assertTitle、assertUrl 和 assertText等断言方法。 main() 方法 import seldom# ...if __name__ __main__:seldom.main(path./,browserchrome,title百度测试用例, description测试环境chrome, debugFalse,rerun0,save_last_runFalse) 说明 path 指定测试目录或文件。browser: 指定测试浏览器默认Chrome。title 指定测试报告标题。description 指定测试报告描述。debug debug模式设置为True不生成测试HTML测试默认为False。rerun : 设置失败重新运行次数默认为 0。save_last_run : 设置只保存最后一次的结果默认为False。 Run the test import seldomseldom.main(path./) # 当前目录下的所有测试文件 seldom.main(path./test_dir/) # 指定目录下的所有测试文件 seldom.main(path./test_dir/test_sample.py) # 指定目录下的测试文件 seldom.main(pathtest_sample.py) # 指定当前目录下的测试文件 说明 如果指定的目录测试文件必须以test 开头。如果要运行子目录下的文件必须在子目录下加 __init__.py 文件。 支持的浏览器及驱动 如果你想指定测试用例在不同的浏览器中运行非常简单只需要在seldom.main()方法中通过browser 参数设置。 import seldomif __name__ __main__:seldom.main(browserchrome) # chrome浏览器,默认值seldom.main(browserfirefox) # firefox浏览器seldom.main(browserie) # IE浏览器seldom.main(browseropera) # opera浏览器seldom.main(browseredge) # edge浏览器seldom.main(browserchrome_headless) # chrome浏览器headless模式seldom.main(browserfirefox_headless) # Firefox浏览器headless模式不同浏览器驱动下载地址 geckodriver(Firefox):Releases · mozilla/geckodriver · GitHub Chromedriver(Chrome):https://sites.google.com/a/chromium.org/chromedriver/home IEDriverServer(IE):http://selenium-release.storage.googleapis.com/index.html operadriver(Opera):Releases · operasoftware/operachromiumdriver · GitHub MicrosoftWebDriver(Edge):Microsoft Edge WebDriver - Microsoft Edge Developer 元素定位 form idform classfm action/s namefspan classbg s_ipt_wr quickdelete-wrapinput idkw classs_ipt namewd 定位方式 self.type(id_kw, textseldom) self.type(namewd, textseldom) self.type(class_names_ipt, textseldom) self.type(taginput, textseldom) self.type(link_texthao123, textseldom) self.type(partial_link_texthao, textseldom) self.type(xpath//input[idkw], textseldom) self.type(css#kw, textseldom)参数化测试用例 seldom 支持参数化测试用例集成了parameterized。 import seldom from seldom import ddt# ...class BaiduTest(seldom.TestCase):ddt.data([(1, seldom),(2, selenium),(3, unittest),])def test_baidu(self, name, keyword):used parameterized test:param name: case name:param keyword: search keywordself.open(https://www.baidu.com)self.type(id_kw, textkeyword)self.click(css#su)self.assertTitle(search_key_百度搜索) page objects 设计模式 seldom 支持Page objects设计模式可以配合poium 使用。 import seldom from poium import Page, PageElementclass BaiduPage(Page):baidu pagesearch_input PageElement(id_kw)search_button PageElement(id_su)class BaiduTest(seldom.TestCase):Baidu serach test casedef test_case(self):A simple testpage BaiduPage(self.driver)page.get(https://www.baidu.com)page.search_input seldompage.search_button.click()self.assertTitle(seldom_百度搜索)if __name__ __main__:seldom.main(test_po_demo.py)poium提供了更多好用的功能使Page层的创建更加简单。 最后感谢每一个认真阅读我文章的人礼尚往来总是要有的这些资料对于【软件测试】的朋友来说应该是最全面最完整的备战仓库虽然不是什么很值钱的东西如果你用得到的话可以直接拿走 这些资料对于【软件测试】的朋友来说应该是最全面最完整的备战仓库这个仓库也陪伴上万个测试工程师们走过最艰难的路程希望也能帮助到你
http://www.zqtcl.cn/news/559121/

相关文章:

  • 网站做淘宝客收入咋样景区门户网站建设方案
  • 遵义做网站推广西安都有哪些公司
  • 万网建网站流程产品展示网站模板php
  • 新津县建设局网站网站做301
  • 网站域名续费如何建设一个简易网站
  • 网站整体迁移该怎么做wordpress 图片调用api接口
  • 网站获得流量最好的方法是什么 ( )汕头建设学校的网站
  • 网上下载的网站后台安全吗仿系统之家网站源码
  • 网站实名审核高等教材电工学久久建筑网
  • 化学试剂购买网站网站节点加速
  • 桂林城乡建设局网站在线咨询免费
  • 长治网站设计制作网站ps怎么做网站导航内嵌式
  • 网站 橙色前台网站开发
  • 滨海网站建设服务商电子商务网站建设与维护pdf
  • 企业网站建设方案效果h5网页制作app
  • 国内搜索引擎网站免费无线
  • 龙岩做网站价格室内建筑设计
  • 闲鱼上面给人做网站造退款微信登录建设银行网站
  • 无锡网站推广公司网络营销课程设置
  • dede 网站根目录北京好的设计公司
  • 网站关键词重复wordpress 影响力
  • 外包商网站怎么做php网站转移
  • 怎么做自己的网站推广产品企业建站 平台
  • 河北做网站公司网站建设团队扬州
  • 114物流网站怎么做免费注册163免费邮箱申请
  • 做网站要以单位手机发博客wordpress
  • 莆田网站建设莆田seo管理系统培训
  • 有一个网站自己做链接获取朋友位置网站关键词数量减少
  • 毕设网站建设论文小程序开发模板
  • 广州网页模板建站电商平台谈双11变冷