基于Selenium的web自动化框架(7)

发表于:2016-11-23来源:测试改进工场作者:测试改进工场点击数: 标签:框架
def getCurrentTime(): format = %a %b %d %H:%M:%S %Y return datetime.now().strftime(format) # Get time diff def timeDiff(starttime,endtime): format = %a %b %d %H:%M:%S %Y return datetime.strptime(endti
def getCurrentTime(): format = "%a %b %d %H:%M:%S %Y" return datetime.now().strftime(format) # Get time diff def timeDiff(starttime,endtime): format = "%a %b %d %H:%M:%S %Y" return datetime.strptime(endtime,format) - datetime.strptime(starttime,format)
复制代码

 

测试用例信息类用来标识测试用例,并且包括执行用例执行结果信息,主要包括以下字段:

复制代码
class TestCaseInfo(object):  
    """description of class"""  
    def __init__(self, id="",name="",owner="",result="Failed",starttime="",endtime="",secondsDuration="",errorinfo=""):  
        self.id = id  
        self.name = name  
        self.owner = owner  
        self.result = result  
        self.starttime = starttime  
        self.endtime = endtime  
  self.secondsDuration = secondsDuration  
  self.errorinfo  



           

原文转自:http://www.cnblogs.com/AlwinXu/p/5836709.html

...