Beispiel #1
0
def run():
    server = Server()
    write_user_cmd = WriteUserCmd()
    server.start_server()
    print "完成start_server()"
    devices_length = write_user_cmd.get_file_lines()
    start_process(main.test_suite.run_suite, devices_length)
Beispiel #2
0
    def start_test(self):
        server = Server()
        port = server.start_server()

        driver = Driver()
        driver.start_driver(port)
Beispiel #3
0
for j in threads:
    print "执行进程---" + str(j)
    j.start()

'''

import unittest
import HTMLTestRunner
from case.mine_test import CaseTest
import os
from util.server import Server


def run_suite(i):
    current_path = os.path.dirname(__file__)
    html_file = current_path + "/report/report" + str(i) + ".html"
    fp = open(html_file, "wb")
    HTMLTestRunner.HTMLTestRunner(fp).run(get_suite(i))


def get_suite(i):
    suite = unittest.TestSuite()
    suite.addTest(CaseTest("test_to_my_req", parame=i))
    suite.addTest(CaseTest("test_to_login", parame=i))
    print "suite--" + str(i), suite
    return suite


Server.start_server()
run_suite(0)