【问题标题】:Generating Hooks For Html test Runner Reports with Py-Installer exe使用 Py-Installer exe 为 Html 测试运行报告生成 Hooks
【发布时间】:2020-07-04 07:19:51
【问题描述】:

如何使用 Py-Installer exe 为 Html 测试运行报告生成挂钩以及如何在下面的脚本中使用?

import os
import sys
import time
import unittest

import HtmlTestRunner



class Test_J(unittest.TestCase):

    def test_Key1(self):
        
        pass

    def test_Key2(self):
        pass
 

    def test_Key3r(self):

        pass

  
if __name__ == '__main__':

    try:
        output1 = 'D:\\Reports'
        title1 = ' Testing Ver-1.0'
        name1 = ' Testing '

        unittest.main(testRunner=HtmlTestRunner.HTMLTestRunner(output=output1, report_title=title1,
                                                               report_name=name1), exit=False,
                      verbosity=2)

  
        
    else:

        print("Thank You Tests Are Finished - Report Generated  )

      
        raw_input("Press Enter To Exit")

【问题讨论】:

    标签: python python-3.x python-2.7 unit-testing


    【解决方案1】:

    我可以通过为 html testrunner 编写外部钩子来让它工作

    【讨论】:

      猜你喜欢
      • 2013-09-03
      • 2018-07-26
      • 1970-01-01
      • 1970-01-01
      • 2020-10-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-03-17
      相关资源
      最近更新 更多