黄瓜/水豚与Selenium? [英] Cucumber/Capybara vs Selenium?

查看:205
本文介绍了黄瓜/水豚与Selenium?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一天,我给我的公司一个测试者在黄瓜写的测试(2个功能,5个场景)。
然后他问我,我不能回答:


这比selenium或任何其他功能测试记录工具?


我知道黄瓜是一种不同的技术,它放在不同的测试水平,但我不明白为什么我应该打扰写和维护黄瓜/水豚测试。



有人可以给我一个合理的解释使用Cucumber / Capybara而不只是Selenium?

解决方案

这个问题是边界性的。你的问题实际上告诉我,什么工具适合我?我说这是因为你不给出一个理由为什么你选择黄瓜和水豚。我相信要回答测试者的问题,你需要先回答几个问题:



1。)你将要编写这些测试的过程中的哪个阶段?



Cucumber可能不是单元测试的正确选择,具体取决于您使用的语言。但它可以用于从单元到集成到最终用户的任何级别的测试。



2。)谁来维护你的测试?您?其他开发者?测试人员?业务分析师?项目经理?



自动化测试必须维护,知道谁将会帮助你决定一个工具,因为某些用户对某些用户来说太技术性。 / p>

3。)谁将要定义新的测试?



Cucumber是用来协同开发,QA和业主。它是利用每个人的知识进入自动化测试过程的完美工具。然而,它需要发展无处不在的语言。您可以在 James Shore的敏捷艺术页面上阅读。



一旦你回答了这些问题,你就可以解决测试者的问题。



但是,有几个比较记录工具(如Selenium IDE,HP Quick Test Pro,IBM Rational Functional Tester)和开发工具(nUnit,jUnit,RSpec,Selenium webdriver,Capybara)时,要记住的是,它们针对不同的受众。



录音工具容易让任何人使用,但是他们创建的脚本很脆弱。它们容易断裂并需要更多维护。它们非常适合一次性自动测试,您需要快速完成这项工作,并拥有非技术人力。



开发工具有更大的学习曲线,需要编程(或至少脚本)经验。脚本通常更健壮,但需要更多的技术知识来维护。它们是一个很好的解决方案,当你想要重复性和计划使用测试很长时间。



我强烈建议你阅读黄瓜书。这将真正帮助你决定是否黄瓜是你的正确选择。


The other day I was showing one of the testers at my company some tests I had written in cucumber (2 features, 5 scenarios). Then he asked me question that I could not answer:

How is this better than selenium or any other functionality test recording tool?

I understand that cucumber is a different technology and it's placed at a different level of testing, but I can't understand why I should bother to write and maintain Cucumber/Capybara tests.

Can someone give me a reasonable explanation for using Cucumber/Capybara instead of just Selenium?

解决方案

This question is borderline asking for an opinion. Your question actually reads to me, "What tool is right for me?" I say this because you don't give a reason for why you chose Cucumber and Capybara. I believe to answer that tester's question, you need to answer a couple more questions first:

1.) What stage in the process are you going to be writing these tests?

Cucumber may not be the right choice for unit tests, depending on the language you're using. But it can be used for any level of testing, from unit to integration to end-user.

2.) Who is going to maintaining your tests? You? Other developers? Testers? Business Analysts? Project Managers?

Automated tests must be maintained, and knowing who will be doing that can help you decide on a tool - as some will be too technical for certain users.

3.) Who is going to be defining new tests?

Cucumber is meant to be used collaboratively between development, QA and business owners. It is the perfect tool for leveraging everyone's knowledge into the automated testing process. It requires the development of an ubiquitous language to be effect however. You can read up on that on James Shore's Art of Agile page.

Once you've answered these questions, you're ready to address the tester's question.

However, there are a couple of points to keep in mind when comparing recording tools (such as Selenium IDE, HP Quick Test Pro, IBM Rational Functional Tester) vs. development tools (nUnit, jUnit, RSpec, Selenium webdriver, Capybara) is that they are targeted towards different audiences. They also have different plusses and minuses.

Recording tools are easy for anyone to use, but the scripts they create are fragile. They break easily and require more maintenance. They are great for one-off automated testing, where you need to get it done quickly and have non-technical manpower.

Development tools have a larger learning curve and require programming (or at the least scripting) experience. The scripts are generally more robust, but require more technical knowledge to maintain. They are a good solution when you want repeatability and plan to use tests for a long time.

I strongly suggest you read The Cucumber Book. It will really help you decide if Cucumber is the right choice for you.

这篇关于黄瓜/水豚与Selenium?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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