import unittest标签:__,loder,alltests,import,suite,main,方法 From: https://www.cnblogs.com/mayueyue/p/17587839.html
from BeautifulReport import BeautifulReport
from testcases.query import testdemo
def allTests():
suite=unittest.TestSuite()
loder=unittest.TestLoader()
#alltests=loder.discover(start_dir="testcases")
#suite.addTest(testdemo("test_1"))
alltests=loder.loadTestsFromTestCase(testdemo)
suite.addTest(alltests)
return suite
if __name__ == "__main__":
runner= BeautifulReport(allTests())
runner.report(description="测试",report_dir="reports")