一起运行 unittest 测试用例和 Robot Framework 测试用例 [英] Running unittest Test Cases and Robot Framework Test Cases Together

查看:68
本文介绍了一起运行 unittest 测试用例和 Robot Framework 测试用例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的小组正在为我们的 QA 小组评估机器人测试框架,不仅是为了 BDD,而且还可能涵盖我们的许多常规功能测试需求.这当然是一个引人注目的项目.

Our group is evaluating Robot Test Framework for our QA group, not just for BDD, but also to possibly cover a lot of our regular functionality testing needs. It certainly is a compelling project.

Robot Framework 在多大程度上(如果有)基于 xunit(unittest)架构?我看到可以使用 unittest 断言,但我没有看到 RF 测试用例本身基于 unittest.TestCase.

To what extent, if any, is Robot Framework based on xunit (unittest) architecture? I see that unittest asserts can be used, but I don't see that the RF testcases themselves are based on unittest.TestCase.

理想情况下,我们的组织希望能够编写 Robot Framework 测试以及 Python unittest 测试用例,从一个运行器一起运行测试用例并获得集成结果,重用 RF 的 Selenium2 库的关键字"作为使用的函数通过我们的常规单元测试测试用例,以便共享一个通用的 SE 代码库.

Ideally, our organization would like to be able to be able to write Robot Framework tests, as well as Python unittest testcases, run the testcases together from one runner and get integrated results, reuse RF's Selenium2 Library's "keywords" as functions used by our regular unittest testcases in order to share a common SE code-base.

这是一个已解决的问题吗?有人做这种事吗?

Is this a solved problem? Does anybody do this kind of thing?

推荐答案

RobotFramework 不是单元测试的正确工具.

RobotFramework is not the right tool for unit testing.

  • 单元测试应使用与单元(模块、类等)相同的语言编写
  • 以自然语言描述场景的能力(这是 RF 等系统最强大的功能之一)在单元测试中毫无价值.在此级别的测试场景中,对于输入 x,您将获得输出 y.

RF 最适合验收测试和集成测试,这是系统的顶级验证.

RF is best suited in Acceptance Testing and Integration Testing, the top-grained verification of your system.

尽管如此,您可以将 RF 和 xunit 集成到您的 QA 系统中.并合并来自 RF 和单元测试的报告.

Nevertheless you can integrate RF and xunit in your QA system together. And merge reports from RF and unit-test.

这篇关于一起运行 unittest 测试用例和 Robot Framework 测试用例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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