我已经购买 UI 自动化工具有一段时间了。而且,之所以如此谨慎,也是为了避免搬起石头砸自己的脚。下面的链接最能描述我的恐惧
http://gojko.net/2010/04/13/how-to-implement-ui-testing-without-shooting-yourself-in-the-foot-2/
我现在非常确定我可以将通过利用带有页面对象设计(负责技术活动部分)的 Selenium2.0 以及 Robot Framework 的关键字功能(负责工作流程和规则部分)来实现目标。那么,会发生什么情况是我将用户定义的关键字与相应的页面方法映射,然后使用关键字在机器人框架上设计测试计划
但是,我还没有找到如何将用户定义的关键字映射到方法的解决方案Java中相应的页面对象设计方法。
关于如何受到赞赏的指导。
谢谢
I have been shopping for tools for UI automation quite a while. And, the reason being so cautious is to prevent from shooting myself in the foot. The link below best describes my fear
http://gojko.net/2010/04/13/how-to-implement-ui-testing-without-shooting-yourself-in-the-foot-2/
I am now quite certain that I can going to meet the goal by leveraging Selenium2.0 with Page Object Design(that takes care of technical activity part) in conjunction with Robot Framework's keyword feature (that takes care of the work flow and rule parts). So, what happen would be I will map user defined keywords with the corresponding Page methods and then use to keywords to design test plans on robot framework
However, I have not found a solution on how to map a user defined keyword to the methods from the corresponding Page Object Designed method in Java.
A guidance on how would be appreciated.
Thanks
发布评论
评论(5)
我们的组织开发了一个框架来支持这一点:https://github.com/ncbi/robotframework-pageobjects。
我在这里写了关于实现这一点的经验:
http://www.kahunacohen.com/2014/ 12/03/new-testing-paradigm-robotframework-pageobjects/
Our organization developed a framework to support this: https://github.com/ncbi/robotframework-pageobjects.
I wrote about the experience of implementing this here:
http://www.kahunacohen.com/2014/12/03/new-testing-paradigm-robotframework-pageobjects/
这里有一些信息可能会有所帮助:http://blog.codecentric.de/en/2010/07/how-to-struct-a-scalable-and-maintainable-acceptance-test-suite/
如果没有,那么,robotframework 用户组就是一个询问的好地方:http://groups.google.com/组/机器人框架用户
There's some info here that might be helpful: http://blog.codecentric.de/en/2010/07/how-to-structure-a-scalable-and-maintainable-acceptance-test-suite/
If not, then a good place to ask would be the robotframework users group: http://groups.google.com/group/robotframework-users
只是补充一下 Ruslan 所说的,我一直在开发一个名为 TOSCA 测试套件 的自动化工具。它对于 UI 测试来说非常出色,并且像魔术一样工作。但是,如果您讨厌不沉浸在脚本中的自动化工具(我所说的脚本是指编码),我建议您远离它。 Tosca 允许您使用称为 TOSCA 向导的内置机制从应用程序捕获屏幕,该机制将应用程序屏幕保存在 .xml 文件中。稍后可以将其导入到您的测试工作区中并可用于创建脚本。
该工具也充当测试管理工具,可让您维护需求、创建测试用例流程、自动化测试用例、执行它们,还可以帮助您报告结果。
您可以在 http://www.tricentis.com/en/home
试试这个,让我们知道是否有帮助。
Just adding to what Ruslan said,I have been working on an automation tool called TOSCA Test suite. Its brilliant for UI testing and works like magic. However, I would advice you to stay away from it if you hate automation tools that are not steeped in scripts (by scripts I mean coding). Tosca lets you capture screens from your application using a inbuilt mechanism called TOSCA Wizard which saves the application screen in a .xml file. This later can be imported inside your testing workspace and can be used to create scripts.
This tool behaves as a test management tool as well and lets you maintain requirement, created testcase flows, automate testcases, execute them and also helps you in reporting the results.
You can find more information about this tool at http://www.tricentis.com/en/home
Try this and let us know if it helped.
我最近写了一个简单的示例,展示了 Java 页面对象到 Robot Framework 纯用户关键字/资源文件格式的转换(全部在用户级别完成,没有代码)。我这样做是因为发现现有示例有点过于复杂,对于那些在实际代码中使用页面对象或遵循代码中给出的页面对象示例的人来说不太直观。这里更接近地反映了代码实现
https://github.com/daluu/robotframework -simple-page-object-example
它不涵盖页面对象的继承以及测试用例可能继承的单独测试相关类。也许这是为了将来更复杂的例子。
然而,我要说的是,可以通过相互引用的资源文件来模仿基本继承。您可能无法获得在代码中获得的范围粒度级别(公共、私有、受保护等)
I recently wrote up a simple example showing a conversion of Java page object to Robot Framework pure user keyword/resource files format (all done at user level, no code). I did it as found the existing examples a bit too complex and less intuitive to those who come from working with page objects in actual code, or who follow page object examples that were given in code. This here more closer mirrors the code implementation
https://github.com/daluu/robotframework-simple-page-object-example
it does not cover inheritance of page objects and separate test related classes that test cases might inherit from. Perhaps that's for a future example that's more complicated.
I will say however that basic inheritance could be mimicked with resource files referencing one another. You just might not get the level of scoping granularity that you would get in code is all (public, private, protected, etc.)
我不认为 Robot 框架是 UI 测试的最佳选择。当测试复杂的系统或系统组件时,它更适合功能集成测试。例如,我用它来测试业务规则引擎。我向引擎发送不同的事件并验证系统是否已切换到适当的状态。
您是否检查过任何其他 UI 测试工具,例如 Watir、托斯卡 还是Sahi?我发现最后一个最有趣的是它如何处理页面上的组件(相对于其他元素)。并且它不需要 UI 组件的任何特殊标签。
I don't think that Robot framework is a best choice for UI testing. It suites better for functional integration testing when a complex system or component of the system is under test. For example I'm using it to test a business rules engine. I send different events to the engine and verify if the system was turned to an appropriate state.
Did you check any other UI testing tools like Watir, Tosca or Sahi? I find the last one the most interesting for the way how it addresses components on the page (relative to other elements). And it doesn't require any special tags for UI components.