简体   繁体   English

ASP.NET应用程序–测试

[英]ASP.NET Applications – Testing

We are building ASP.NET applications using VSTS (Visual Studio Team System) 2008 as IDE & C#.NET as Programming Language. 我们正在使用VSTS(Visual Studio Team System)2008作为IDE以及C#.NET作为编程语言来构建ASP.NET应用程序。

Would you please let me know whether we could test these applications using VSTS 2008? 您能否让我知道我们是否可以使用VSTS 2008测试这些应用程序? If so would you please provide the details? 如果可以,请提供详细信息吗?

Are there any other VSTS integrated tools / third-party tools which we could use for testing the web applications. 还有其他可用于测试Web应用程序的VSTS集成工具/第三方工具。 The testing could be Unit/Functional/Load Testing etc. 测试可以是单元/功能/负载测试等。

Many thanks. 非常感谢。

Regards, Reshma. 问候,Reshma。

That question is a tough one. 这个问题很难解决。

If you did not separate your business logic from your UI logic in your web forms, no, this is not going to be easily testable. 如果您没有在Web表单中将业务逻辑与UI逻辑分开,则不会,这将很难测试。 But that is not depending on VSTS or any other testing framework but on the 'qualility' and testability of your code solely. 但这不取决于VSTS或任何其他测试框架,而仅取决于代码的“质量”和可测试性。

If you really want to test your application, you should try to use the ASP.NET MVC framework. 如果您确实要测试您的应用程序,则应尝试使用ASP.NET MVC框架。 It's designed to being well testable, and if applied correctly you end up with clean, testable code. 它被设计为可良好测试的,并且如果正确应用,您最终将得到干净的,可测试的代码。

Any testing framework (NUnit, MSpec, the VSTS-built in Framework etc.) will do just fine. 任何测试框架(NUnit,MSpec,框架内置的VSTS等)都可以。

If you want to test your Web-GUI you may want to have a look at Web UI Test studio from Telerik. 如果要测试Web-GUI,则可能需要看一下Telerik的Web UI Test studio Even if I had very bad experience with their ASP.NET controls in terms of performance and testability, this testing tool seems to work fine. 即使在性能和可测试性方面我对他们的ASP.NET控件有非常糟糕的经验,但该测试工具似乎仍然可以正常工作。

I'm going to comment on the capabilities of Visual Studio Team System for testing rather than focus on the topic of how to conduct any particular type of testing. 我将评论Visual Studio Team System的测试功能,而不是关注如何进行任何特定类型的测试的主题。 For instance, unit testing is a broad topic that includes many practices on how to design your software for testability and approaches to undertake in developing your code (like TDD - test driven development). 例如,单元测试是一个广泛的主题,包括许多有关如何设计软件以实现可测试性的实践以及开发代码的方法(例如TDD-测试驱动的开发)。

Visual Studio Team System 2008 includes a suite of testing tools including support for testing web applications. Visual Studio Team System 2008包括一套测试工具,包括对Web应用程序的支持。

You can: 您可以:

  • Build unit tests to test the code components of your application (provided you have designed your code to be testable, 构建单元测试以测试应用程序的代码组件(前提是您已将代码设计为可测试的,
  • Build web tests that mimic browser behaviour by recording a browsing session and replaying it during a test run, 通过记录浏览会话并在测试运行期间重放浏览器来构建模仿浏览器行为的网络测试,
  • Conduct load testing by simulating groups of users accessing your site. 通过模拟访问您的站点的用户组来进行负载测试。

You can learn more from: 您可以从以下网站了解更多信息:

是的,您可以,有专用的VS版本-MSVS Test Edition

看一下Ivonna ,集成和单元Asp.Net测试工具。

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

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