vb.net 项目的单元测试

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22397086/
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-17 17:04:25  来源:igfitidea点击:

Unit Testing of vb.net project

vb.netunit-testingintegrationintegration-testingsystem-testing

提问by Krishna Chauhan

I am asked to do testing of the project which I've made, the question is like that:

我被要求对我所做的项目进行测试,问题是这样的:

Testing (Test case designs are to be included separately for Unit testing, Integration testing, System testing; Reports of the outcome of Unit testing, Integration testing, System testing are to be included separately. Also, details of debugging and code improvement are to be included.)

测试(单元测试、集成测试、系统测试单独包含测试用例设计;单元测试、集成测试、系统测试结果报告单独包含。此外,调试和代码改进的细节要包括。)

The question is that how am I supposed to do unit testing and how can I show that on my project report.

问题是我应该如何进行单元测试以及如何在我的项目报告中显示它。

回答by Phillip Trelford

how am i supposed to do unit testing

我应该如何进行单元测试

The most popular unit testing frameworkson .Net are NUnit, xUnitand the Visual Studio Unit Testing Framework(also known as MSTest).

.Net 上最流行的单元测试框架NUnitxUnitVisual Studio 单元测试框架(也称为 MSTest)。

There is a built-in unit testing project type in Visual Studio, try new project and look in the Test section.

Visual Studio 中有一个内置的单元测试项目类型,尝试新项目并查看测试部分。

I'd recommend reading up on unit testingapproaches. There is a lotof material out there in books and online. Key advice is to test behaviour, not methods.

我建议阅读单元测试方法。有一个大量的材料赫然出现在书本和网上的。关键建议是测试行为,而不是方法

how can I show that on my project report

我怎样才能在我的项目报告中显示它

It is common practice to set up continuous integrationfor software projects. Continuous integration tools like TeamCitycan provide reports on unit test passes and failures through to code coverage on each build.

为软件项目设置持续集成是常见的做法。TeamCity等持续集成工具可以提供有关单元测试通过和失败的报告,直至每次构建的代码覆盖率。