如何使用sikuli桌面应用程序生成报告 [英] How to generate report using sikuli for desktop application

查看:770
本文介绍了如何使用sikuli桌面应用程序生成报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用自动化的sikuli应用。现在的计划是完整的图像(通常sikuli程序)的,我想生成测试用例的最后报告。我只能看到机器人框架选项生成报告。我不知道蟒蛇。我该怎么办,没有机器人框架?你可以强制指导我的步骤,这样做呢?如果没有选择导向用正常的方式。谢谢

I automated an application using sikuli. Now the program is full of image (usual sikuli program), I want to generate the final report for the test cases. I can only see the option for robot framework to generate the report. I don't know python. How can I do that without robot framework? Can you jus guide me with the steps to do that? if there is no option guide with the normal way. Thanks

推荐答案

您可以尝试这两种之一:

You can try one of those two:


  • HTMLTestRunner 可以通过添加这个脚本(和.py文件)中使用您currrent解决方案:

  • HTMLTestRunner can be used by adding this script (and the .py file) to your currrent solution:

- 脚本 -

from sikuli import *
import unittest
import HTMLTestRunner

Class ClassName(unittest.TestCase):

#paste your script

suite = unittest.TestLoader().loadTestsFromTestCase(ClassName)
outfile = open("C:\\Sikuli\\Reports\\report.html", "w") # path to report folder
runner = HTMLTestRunner.HTMLTestRunner(stream=outfile, title=' Report Title', description='desc..' )
runner.run(suite)  


  • XMLTestRunner 几乎与上面相同:

    • XMLTestRunner almost the same as above:
    • - 脚本 -

      import xmlrunner
      import unittest
      
      class MyTest(unittest.TestCase):
          def setUp(self):
              // setUp
      
          def testMyTest(self):
              // test
      
          def tearDown(self):
              // tearDown
      
      suite = unittest.TestLoader().loadTestsFromTestCase(MyTest)
      result = XMLTestRunner(file("unittest.xml", "w")).run(suite)
      

      这篇关于如何使用sikuli桌面应用程序生成报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆