盘天下 | 免费精选资源分享

Application Testing with Capybara

出版刊物 2025-02-16 536 0


Application Testing with Capybara

内容简介

One of my colleagues once described the Ruby community as “Test Infected” and if

any library epitomizes this it’s Capybara, which has g ai ned popularity exponentially

since it was first released. The Ruby community certainly owes its creator Jonas

Nicklas a great deal of thanks for bringing peace and harmony to many test

auto mation code bases around the globe.

The proof of Capybara’s success is the way in which its use has spread far beyond

just testing Rails applications and now supports testing of many web applications

written in a wide variety of languages and frameworks. Capybara’s functionality

has also been replicated in languages other than Ruby again high light ing just how

powerful the concept is.

So what is Capybara?

Capybara provides a domain-specific language for test automation ; this DSL extends

the human-readable BDD style of frameworks such as Cucumber and RSpec into the

automation code itself. For example, opening a browser and navigating to a URL is

as simple as visit http:// google .com. This is a vast improvement over typical

test APIs.

Additionally Capybara allows us to write tests once and run them in any compatible

driver . The drive r ecosystem is vibrant and switching libraries is as simple as adding

an additional gem and making a one-line change to your code.

Finally, you can do away with writing bespoke methods that wait for content

to become visible or adding sleep statements to your tests; Capybara handles

asynchronous JavaScript without the user even noticing.

Capybara is quite literally your one-stop shop for test automation.

下载地址

本站夸克网盘精选资源合集:https://pan.quark.cn/s/936c760dd840

冲上云霄

转载请注明出处,本文链接:https://www.80srz.com/pantx/80888.html

(2)
收藏 (0)
取消

感谢您的支持,我们会继续努力的!

扫码支持
扫码打赏,你说多少就多少

打开 支付宝 扫一扫,即可进行扫码打赏哦

评论列表