我可以将 Webrat 用于 ASP.NET 应用程序吗?

发布于 2024-08-13 17:08:42 字数 84 浏览 2 评论 0 原文

Webrat 是否要求 Web 应用程序用 Ruby/Rails 编写?

我想尝试用它来编写针对 ASP.NET Web 应用程序的测试。

Does Webrat require that the web application be written in Ruby/Rails?

I'd like to try it for writing tests against an ASP.NET web application.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

千纸鹤带着心事 2024-08-20 17:08:42

您可以将 webrat 用于任何应用程序,而不仅仅是 Rails。你要做的就是使用 Cucumber + Webrat + Mechanize 适配器。这种组合会针对您的 Web 应用程序发出普通的 HTTP 请求。

事实上,目前,我正在开发一个简单的冒烟测试,用于测试网站门户,并可以验证所有内容是否在不同环境中正常运行。 (本地主机、测试环境、暂存、生产)。

看看 Cucumbers 的源码。文件夹中有一个例子:
cucumber/examples/webrat/

你要做的就是告诉 Webrat使用机械化适配器。现在您拥有一个无头浏览器,可以访问任何应用程序,无论它使用什么框架。

请注意,如果您需要完整的 javascript 支持,您可能需要其他东西(Watir、Firewatir、Selenium 等)。

You can use webrat for any application, not just Rails. What you do is to use Cucumber + Webrat + Mechanize adapter. This combination makes ordinary HTTP requests against your web application.

In fact, for the moment, i'm working on a simple smoketest that tests a website portal and can verify that everything is up and running in different environments. (localhost, test env, staging, production).

Have a look in Cucumbers' source. There is an example in the folder:
cucumber/examples/webrat/

What you do is to tell Webrat to use the Mechanize adapter. Now you have a headless browser that can access any application regardless of the framework it uses.

Note that if you need full javascript support, you probably want something else (Watir,Firewatir, Selenium, etc).

坏尐絯℡ 2024-08-20 17:08:42

跳转到轨道会更容易:PI 偶然发现这篇文章,因为我认为这会非常方便。

看看Cuke4Nuke

另外查看作者的博客,有一个不错的screencast 但它使用WatiN

这里还有一些关于最终能够为 mvc 构建相当于 webrat 的讨论

https://rspec.lighthouseapp.com/projects/16211-cucumber/tickets/428-wire-protocol

It would be easier to jump to rails :P I stumbled upon this post because I was thinking that would be very handy.

Have a look at Cuke4Nuke

Also checkout the authors blog, there is a nice screencast but it uses WatiN

There is also some discussion here about eventually being able to build the equivalent of webrat for mvc

https://rspec.lighthouseapp.com/projects/16211-cucumber/tickets/428-wire-protocol

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文