import unittest
import HTMLTestRunner
import time
import os

def allTests():
    suite = unittest.defaultTestLoader.discover(
        start_dir=r'D:\Python\UI\testCase',
        pattern='test_*.py',
        top_level_dir=None
    )
    return suite

def getNowTime():
    return time.strftime('%Y-%m-%d-%H-%M-%S', time.localtime(time.time()))

def report():
    fileName = os.path.join(
        r'D:\Python\UI\report',
        getNowTime()+'report.html')
    fp = open(fileName, 'wb')
    runner = HTMLTestRunner.HTMLTestRunner(
        stream=fp,
        title='测试报告',
        description='详细报告')
    runner.run(allTests())
if __name__ == '__main__':
    report()


083daded3b72b2deae6d3dd8b567ccf47c306db6
<mask token>


def allTests():
    suite = unittest.defaultTestLoader.discover(start_dir=
        'D:\\Python\\UI\\testCase', pattern='test_*.py', top_level_dir=None)
    return suite


<mask token>


def report():
    fileName = os.path.join('D:\\Python\\UI\\report', getNowTime() +
        'report.html')
    fp = open(fileName, 'wb')
    runner = HTMLTestRunner.HTMLTestRunner(stream=fp, title='测试报告',
        description='详细报告')
    runner.run(allTests())


<mask token>

<mask token>


def allTests():
    suite = unittest.defaultTestLoader.discover(start_dir=
        'D:\\Python\\UI\\testCase', pattern='test_*.py', top_level_dir=None)
    return suite


def getNowTime():
    return time.strftime('%Y-%m-%d-%H-%M-%S', time.localtime(time.time()))


def report():
    fileName = os.path.join('D:\\Python\\UI\\report', getNowTime() +
        'report.html')
    fp = open(fileName, 'wb')
    runner = HTMLTestRunner.HTMLTestRunner(stream=fp, title='测试报告',
        description='详细报告')
    runner.run(allTests())


<mask token>

<mask token>


def allTests():
    suite = unittest.defaultTestLoader.discover(start_dir=
        'D:\\Python\\UI\\testCase', pattern='test_*.py', top_level_dir=None)
    return suite


def getNowTime():
    return time.strftime('%Y-%m-%d-%H-%M-%S', time.localtime(time.time()))


def report():
    fileName = os.path.join('D:\\Python\\UI\\report', getNowTime() +
        'report.html')
    fp = open(fileName, 'wb')
    runner = HTMLTestRunner.HTMLTestRunner(stream=fp, title='测试报告',
        description='详细报告')
    runner.run(allTests())


if __name__ == '__main__':
    report()

import unittest
import HTMLTestRunner
import time
import os


def allTests():
    suite = unittest.defaultTestLoader.discover(start_dir=
        'D:\\Python\\UI\\testCase', pattern='test_*.py', top_level_dir=None)
    return suite


def getNowTime():
    return time.strftime('%Y-%m-%d-%H-%M-%S', time.localtime(time.time()))


def report():
    fileName = os.path.join('D:\\Python\\UI\\report', getNowTime() +
        'report.html')
    fp = open(fileName, 'wb')
    runner = HTMLTestRunner.HTMLTestRunner(stream=fp, title='测试报告',
        description='详细报告')
    runner.run(allTests())


if __name__ == '__main__':
    report()

import unittest
import HTMLTestRunner
import time
import os

def allTests():
    suite = unittest.defaultTestLoader.discover(
        start_dir=r'D:\Python\UI\testCase',
        pattern='test_*.py',
        top_level_dir=None
    )
    return suite

def getNowTime():
    return time.strftime('%Y-%m-%d-%H-%M-%S', time.localtime(time.time()))

def report():
    fileName = os.path.join(
        r'D:\Python\UI\report',
        getNowTime()+'report.html')
    fp = open(fileName, 'wb')
    runner = HTMLTestRunner.HTMLTestRunner(
        stream=fp,
        title='测试报告',
        description='详细报告')
    runner.run(allTests())
if __name__ == '__main__':
    report()

