-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_tests.py
More file actions
27 lines (20 loc) · 769 Bytes
/
Copy pathrun_tests.py
File metadata and controls
27 lines (20 loc) · 769 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date : 2018-03-13 15:25:05
# @Author : Your Name (you@example.org)
# @Link : http://example.org
# @Version : $Id$
import unittest,time
from Test_interface_py_cm import Test_interface_py_cm
from HTMLTestRunner import HTMLTestRunner
test_dir = './'
discover = unittest.defaultTestLoader.discover(test_dir, pattern='test*.py')
if __name__ == "__main__":
now = time.strftime("%Y-%m-%d %H_%M_%S")
filename = './report/' + now + '_result.html'
fp = open(filename, 'wb')
runner = HTMLTestRunner(stream=fp,
title='Guest Manage System Interface Test Report',
description='Implementation Example with:')
runner.run(discover)
fp.close()