不使用 Visual Studio 生成 .webtest 文件
我们希望让商业用户参与为我们的项目编写 Web 测试,但仅出于此目的购买完整的 Visual Studio 许可证似乎有点矫枉过正。
是否有任何开源或第三方工具可用于生成可由 Visual Studio 读取的 Web 测试?
我更喜欢一个集成到 IE 或 Firefox 中的工具,并且可以像 Visual Studio 集成提供的点击方法一样简单地生成测试。
We have business users that we'd like to get involved writing webtests for our project, but purchasing full Visual Studio licenses just for this purpose seems like overkill.
Are there any open source or third-party tools that can be used to produce webtests that can be read by Visual Studio?
I would prefer a tool that integrates into IE or Firefox and can generate tests as simply as the point-and-click method that the Visual Studio integration provides.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
虽然我认为 Selenium 和 Watin/Watir 是有价值的替代品,但它们都是相当强大的测试解决方案,但我认为它们都不允许您像 VisualStudio 2008 开箱即用地记录 .webtests 一样。 我相信他们会记录单元测试,如果这是您想要的,那就没问题。 据我所知,唯一能完全满足您要求的工具是 Fiddler。
http://www.fiddler2.com/fiddler2/
罗伯托.-
While I would consider Selenium and Watin/Watir as valuable alternatives, they are preety robust testing solutions, I don't think neither would allow you to record .webtests as done by VisualStudio 2008 out of the box. I believe they record unit tests which is fine if that is what you want. The only tool that I know that does exactly what you are asking for is Fiddler.
http://www.fiddler2.com/fiddler2/
Roberto.-
您可以查看 Selenium,网址为 http://seleniumhq.org/。
“也许是最完整的包,支持在 IE、FireFox 和 Safari 中进行测试。您的单元测试是用 java 编写的,因此您只需要学习 API。它们还有有趣的服务器选项,您可以在其中跨服务器运行测试您甚至可以使用 FireFox 插件记录测试。” (来源)
您可以例如,稍后将使用 Firefox 创建的测试作为 C# 中的单元测试运行。
You could check out Selenium, at http://seleniumhq.org/.
"Maybe the most complete package of the bunch and supports testing in IE, FireFox and Safari. Your unit tests are written in java, so you just need to learn the API. They also have interesting server options where you can run your tests across servers. You can even record tests using a FireFox add-on." (source)
You can later run the tests created with Firefox as unit tests in C#, for example.
您可以使用 selenium、watir、webrat 等。这是 Scott Hanselman 的一篇文章,描述了将 watir 集成到 NUnit 断言中:
http://www.hanselman.com/blog/IntegratingRubyAndWatirWithNUnit.aspx
这实际上是一个很好的示例,也可用于将外部测试框架绑定到 MS Test 框架中。 这是一个需要花费少量精力来创建读取外部测试框架输出的断言的项目,但这并不困难。 我们现在在工作中将其与 watir 一起使用,可能很快就会与 webrat 和 mechanize 结合使用。
Watir 确实有一个可用的记录器,请查看 OpenQA:http://watir-recorder.openqa.org/
You can use something like selenium, watir, webrat, etc. Here is an article from Scott Hanselman that describes integrating watir into an NUnit assertion:
http://www.hanselman.com/blog/IntegratingRubyAndWatirWithNUnit.aspx
It's actually a great example that can be used to tie an external testing framework into the MS Test framework as well. This is a project where a small amount of effort to create an assertion that reads the external test framework output, but it's not difficult. We are using this at work now with watir and possibly soon with a combination of webrat and mechanize.
Watir does have a recorder available, check out OpenQA: http://watir-recorder.openqa.org/
我不知道有任何使用 Visual Studios Web 测试框架的东西,但是,正如 Andrea 指出的,您可以使用 selenium。 我会推荐 Selenium RC,因为只要支持 http 连接,您就可以用任何您想要的语言和测试框架编写测试。 我使用 rc 通过 NUnit 在 C# 中编写测试,但您可以使用任何 vb、ironpython、托管 c++、f# 等以及 Microsoft 测试框架。 Selenium IDE 是一个 Firefox 浏览器扩展(尚无 IE 版本),但 selenium 可在大多数 Web 浏览器中运行,包括 IE、FF、Safari 和 Opera。
其他选项可能包括 WatiN,它与 selenium 类似。 这两个框架都支持功能测试方法。 对于单元测试,您可能需要看看 NunitAsp。
I don't know of anything that uses visual studios web test framework but, as Andrea pointed out, you can use selenium. I would recommend Selenium RC because you can write you tests in whatever language and test framework you want as long as there is support for http connections. I use rc to write tests in C# with NUnit but you could use any vb, ironpython, managed c++, f#, etc. and the Microsoft test framework. The Selenium IDE is a firefox browser extension (no IE version available yet) but selenium works in most web browsers including IE, FF, Safari and Opera.
Other options could include WatiN, which is similar to selenium. Both frameworks support a Functionality testing approach. For unit tests you may want to take a look at NunitAsp.
Fiddler2 允许用户将其浏览器会话记录为 Visual Studio Web 测试。
这将允许人们创建基本的测试。 然而,开发一个好的 Web 测试通常涉及编码的 Web 测试,如果没有 Visual Studio 的测试版本,效果就不太好。
Fiddler2 allows users to record thier browser session as a Visual Studio web test.
That would allow people to create the basic tests. However, developing a good web test usually involves a coded webtest, not quite so good without the test edition of Visual Studio.
我肯定会推荐其他工具用于此目的。 Microsoft VSTS WebTest 是为性能测试而设计的,并不是功能测试的好工具。
在大多数情况下,WebTest 必须相互关联,这将负责维护 HTTP 会话和其他动态值。 您可以遵循本指南 如果您仍然感兴趣。
我想您的团队的最佳选择是使用 Selenium 进行简单的记录和回放。 根据我的经验,业务用户的技术水平不足以应对脚本编写。
如果您决定采用 WARIT,您可以获得能够在更多浏览器上播放脚本(与 Selenium 相比)的额外好处,但它有不同类型的挑战,并且也不是适合业务用户的工具。
谢谢,
马切伊
I would definitely recommend other tool for this purpose. Microsoft VSTS WebTest are designed for performance testing and are not a good tool for functional testing.
In most of the cases WebTest would have to be correlated which will take care of maintaining HTTP session and other dynamic values. You could follow this guide if you are still interested.
I guess the best option for your team would be to use Selenium with just simple record and playback. From my experience business users will not be technical enough to cope with scripting.
You could get additional benefit of being able to play back the script on more browsers (comparing to Selenium) if you decide to adopt WARIT but it has different kind of challenge and will not be suitable tool for business users either.
Thanks,
Maciej