https://blog.youkuaiyun.com/qq_27275447/article/details/80270270
https://blog.youkuaiyun.com/m0_38034387/article/details/80566528
unittest中最核心的四个概念是:test case, test suite, test runner, test fixture。
TestCase :测试用例,python中的一个继承了unittest.TestCase的class。
TestSuite :多个测试用例集合在一起,就是TestSuite
TestLoader :是用来加载TestCase到TestSuite中的
TestRunner :是来执行测试用例的,测试的结果会保存到TestResult实例中,包括运行了多少测试用例,成功了多少,失败了多少等信息
(元素、方法、值等是从表中读取,非直接写入)
待解决1:怎么查看unitest的基类,进行二次封装
1、引入npm包,因读取表中数据,所以导入xlrd
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import NoSuchElementException #异常捕捉
from selenium.common.exceptions import NoAlertPresentException
import os,time
import xlrd
from threading import Thread
#import