简体   繁体   English

如何使用Ruby Watir和Cucumber设置QA自动化框架

[英]How to set up QA Automation Framework with Ruby Watir and Cucumber

I'm trying to build a framework with Ruby using Watir and Cucumber, also I need to put my GUI-MAP into *.yml file. 我正在尝试使用Watir和Cucumber使用Ruby构建框架,也需要将GUI-MAP放入* .yml文件。 I've been trying to find answers on Google, but can't find any, is there anyone knows the steps or maybe has experience with something like that. 我一直在尝试在Google上找到答案,但是找不到任何答案,是否有人知道这些步骤或有类似的经验。 Thank You 谢谢

I wrote a blog post about this titled: "My simple Cucumber + Watir page object pattern framework" 我写了一篇关于此的博客文章,标题为:“我的简单Cucumber + Watir页面对象模式框架”

http://watirmelon.com/2011/01/21/my-simple-cucumber-watir-page-object-pattern-framework/ http://watirmelon.com/2011/01/21/my-simple-cucumber-watir-page-object-pattern-framework/

You might look at the Taza or Watircraft frameworks. 您可能会看一下Taza或Watircraft框架。 they both allow you to define 'pages' which are roughly equivalent to a GUImap, and provide that abstraction layer which allows you to name things and have a single place that defines how they are identified within the DOM. 它们都允许您定义与GUImap大致等效的“页面”,并提供抽象层,该层允许您为事物命名并在一个地方定义如何在DOM中标识事物。

It's done page by page instead of a giant monolithic file like a QTP Guimap, but I find that makes it actually easier to maintain because I don't have to worry about there being for example different "save" buttons on 4 different pages that may well have their own unique ID's. 它是逐页完成的,而不是像QTP Guimap这样的巨型单片文件,但是我发现它实际上使维护起来更容易,因为我不必担心例如在4个不同的页面上可能存在不同的“保存”按钮。并拥有自己的唯一ID。 I can name each one 'save_button' instead of more convoluted names, because I'll be addressing them according to the page that contains them. 我可以为每个按钮都命名为“ save_button”,而不是更复杂的名称,因为我将根据包含它们的页面对其进行寻址。 eg my_account_page.save_button.click 例如my_account_page.save_button.click

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM