.NET 测试自动化工具

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1465455/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-03 13:21:59  来源:igfitidea点击:

Testing Automation Tools For .NET

.nettestingopen-sourceautomation

提问by Onion-Knight

I'm trying to find some useful Open Source Testing Automation Tools for use with the .NET framework. I've done a fair bit of research, but unfortunately, most of the tools I have found focus on testing web applications only.

我试图找到一些有用的开源测试自动化工具,用于 .NET 框架。我做了一些研究,但不幸的是,我发现的大多数工具都只专注于测试 Web 应用程序。

There are 3 types of programs that we run in order to make our software do what it needs to do: We program a service in VB.NET to collect data, we have an AJAX/JavaScript + VB/ASP.NET web application to view the data, and a VB.NET Form-based GUI to edit the data.

我们运行了 3 种类型的程序,以使我们的软件完成它需要做的事情:我们在 VB.NET 中编写一个服务来收集数据,我们有一个 AJAX/JavaScript + VB/ASP.NET Web 应用程序来查看数据,以及基于 VB.NET 窗体的 GUI 来编辑数据。

I understand that the chances finding a tool that would test all three is slim to nil, but I was not expecting a single tool to cover all of them.

我知道找到一个工具来测试所有三个的可能性很小,但我没想到一个工具可以涵盖所有这些。

Since the service we run is the most important, I was hoping the Stack Overflow community might have some insight as to what testing automation tools would be particularly useful for VB.NET services. Any information with respect to the GUI or Web Application sides would be a great help as well.

由于我们运行的服务是最重要的,我希望 Stack Overflow 社区可以对哪些测试自动化工具对 VB.NET 服务特别有用有一些见解。任何有关 GUI 或 Web 应用程序方面的信息也会有很大帮助。

采纳答案by Vadim

You can test your service with any unit test framework like NUnit, MbUnit, MSTest, ... .

您可以使用任何单元测试框架(如NUnitMbUnit、 MSTest等)来测试您的服务。

Your web application like you probably know there many different applications like Watir, Watin, Selenium, SWAT, Telerik WebUITest Studio.

像您一样的 Web 应用程序可能知道有许多不同的应用程序,例如WatirWatinSeleniumSWATTelerik WebUITest Studio

I'm not familiar with Windows form testing tool; however, I know that Telerik is comming up with one.

我不熟悉 Windows 表单测试工具;然而,我知道 Telerik 正在提出一个。

回答by Graviton

TestComplete.

测试完成。

You can definitely use capture-replay to capture and run the test script. But I would suggest that you must at least manually edit your scripts to make them

您绝对可以使用捕获重放来捕获和运行测试脚本。但我建议你至少必须手动编辑你的脚本来制作它们

  1. more readable
  2. easier to maintain.
  1. 更具可读性
  2. 更容易维护。

The good thing about TestComplete is that it is able to look into your form's properties, capture those properties so that you can refer to those properties by their name, not by just screen coordinates.

TestComplete 的好处是它能够查看表单的属性,捕获这些属性,以便您可以通过名称而不是仅通过屏幕坐标来引用这些属性。

Here's a similar question.

这是一个类似的问题

回答by Dinis Cruz

Using the Apis I developed for https://github.com/o2platform/FluentSharpI was able to write tests that cover the 3 scenarios that you mention

使用我为https://github.com/o2platform/FluentSharp开发的 API,我能够编写涵盖您提到的 3 个场景的测试

See these tests https://github.com/TeamMentor/Dev/tree/master/Source_Code/TM_UnitTests/TeamMentor.UnitTests.QAfor a significant number of real-world tests written that way

有关以这种方式编写的大量实际测试,请参阅这些测试https://github.com/TeamMentor/Dev/tree/master/Source_Code/TM_UnitTests/TeamMentor.UnitTests.QA

See also disable IE visibility while using WatiNfor an example of an Web Automation test

有关Web 自动化测试的示例,另请参阅使用 WatiN 时禁用 IE 可见性

回答by AutomatedTester

There are a number of good tools for testing.

有许多很好的测试工具。

Business Objects - test with NUnit,mbUnit,MSTest

业务对象 - 使用NUnit、mbUnit、MSTest 进行测试

Web testing - Seleniumand NUnit or WatiN

Web 测试 - Selenium和 NUnit 或WatiN

Desktop GUI - not sure but you could try pyWinAuto - its a python application but you could use IronPython which is the .NET implementation

桌面 GUI - 不确定,但您可以尝试 pyWinAuto - 它是一个 python 应用程序,但您可以使用 IronPython,它是 .NET 实现

回答by Sheff

For load testing you cant beat Open STA

对于负载测试,您无法击败Open STA

回答by Safa

For unit, integrate and static testing you can using Parasoft.

对于单元、集成和静态测试,您可以使用 Parasoft