# coding=utf-8

'''created :2018/3/29
author:star
project: testsuite'''
import unittest,time,os
from baidu import test_baidu
from youdao import test_youdao
#构建测试集
suite=unittest.TestSuite()
suite.addTest(test_baidu.baidu("test_baidu"))
suite.addTest(test_youdao.youdao("test_youdao")) if __name__ == '__main__':
#执行测试
runner=unittest.TextTestRunner()
runner.run(suite) 此处注意我的目录结构。
补充二点:
1,在导入的时候,一定要在BAIDU。PY和YOUDAO。PY里加一个,

以前看虫师的书里有介绍过原因。具体的忘记了原因。如果不加,导入会报错。

2,

箭头所指是CLASS后面的类名,免得写错。

												

unittest框架学习笔记三之testsuite的更多相关文章

  1. unittest框架学习笔记四之report

    # coding=utf-8'''created:2018/3/29 author:star project:test report'''# import time,os# from selenium ...

  2. selenium + python自动化测试unittest框架学习(三)webdriver对页面其他控件操作(三)

    1.对话框,下拉框 (1)对话框的有两种,一种是iframe格式的,需要switch_to_iframe()进行定位,现在大部分的对话框是div格式的,这种格式的可以通过层级定位来定位元素,先定位对话 ...

  3. selenium + python自动化测试unittest框架学习(三)webdriver元素定位(一)

    1.Webdriver原理 webdirver是一款web自动化操作工具,为浏览器提供统一的webdriver接口,由client也就是我们的测试脚本提交请求,remote server浏览器进行响应 ...

  4. unittest框架学习笔记五之参数化

    例子一: # coding=utf-8'''created:2018/3/29 author:star project:lianxi canshuhua'''from selenium import ...

  5. unittest框架学习笔记二之discover

    coding=utf-8'''Created on 2018/3/29 author:star Project:discover测试用例''' import unittest,time,oslist= ...

  6. unittest框架学习笔记一之testcase

    # coding=utf-8案例一: 2 ''' 3 Created on 2017-7-22 4 @author: Jennifer 5 Project:登录百度测试用例 6 ''' 7 from ...

  7. 集合框架学习笔记<三>

    一些重要的区别 set与list的区别: set是无索引的,list是有索引的: ArrayList与LinkList的区别: 前者是基于数组实现的,后者是基于链表实现的: 两者的使用方法一样,但是在 ...

  8. semantic ui框架学习笔记三

    网格系统 基本网格 <div class="ui grid"> <div class="column"></div> < ...

  9. selenium + python自动化测试unittest框架学习(三)webdriver元素操作(二)

    上一篇是元素的定位,那么定位元素的目的就是对元素进行操作,例如写入文本,点击按钮,拖动等等的操作 (1)简单元素操作 简单元素操作 find_element_by_id("kw") ...

随机推荐

  1. 【2019 Multi-University Training Contest 1】

    01:https://www.cnblogs.com/myx12345/p/11543105.html 02:https://www.cnblogs.com/myx12345/p/11439320.h ...

  2. Least Common Ancestors

    /* Least Common Ancestors * Au: Small_Ash */ #include <bits/stdc++.h> using namespace std; con ...

  3. Python3中 if __name__=='__main__'是个什么意思

    在python前期学习中或者在学flask中,if_name_ = ="_main_"经常出现在我们的眼帘中,我们经常会问,这个是个什么玩意儿,它是干什么的? 我们知道,if 语句 ...

  4. HTML-参考手册: HTML ISO-8859-1

    ylbtech-HTML-参考手册: HTML ISO-8859-1 1.返回顶部 1. HTML ISO-8859-1 参考手册 现代的浏览器支持的字符集: ASCII 字符集 标准 ISO 字符集 ...

  5. Eclipes 安装windowbuilding

    一.找到对应版本的windowbuilder 打开这个链接:http://www.eclipse.org/windowbuilder/download.php eclipse的版本号可以在eclips ...

  6. upc组队赛5 Assembly Required【思维】

    Assembly Required 题目描述 Princess Lucy broke her old reading lamp, and needs a new one. The castle ord ...

  7. 简单了解Redis

    redis是什么 redis是一种支持key-value等多种数据结构的存储系统,可用于缓存,事件发布,消息队列等场景,支持多种数据类型 string.hash.list.set.zset.而且基于内 ...

  8. 发布 Vant - 高效的 Vue 组件库,再造一个有赞移动商城也不在话下

    发布 Vant - 高效的 Vue 组件库,再造一个有赞移动商城也不在话下:https://segmentfault.com/a/1190000011377961 vantUI框架在vue项目中的应用 ...

  9. Promise篇

    Promise 原理解析与实现(遵循Promise/A+规范)   1 什么是Promise? Promise是JS异步编程中的重要概念,异步抽象处理对象,是目前比较流行Javascript异步编程解 ...

  10. Spring Boot国际化支持

    本章将讲解如何在Spring Boot和Thymeleaf中做页面模板国际化的支持,根据系统语言环境或者session中的语言来自动读取不同环境中的文字. 国际化自动配置 Spring Boot中已经 ...