简体   繁体   English

在已部署的项目上部署后如何运行NUnit测试

[英]How to run NUnit tests after deploy on deployed project

Is there any way to run Nunit tests on deployed project? 有什么方法可以在已部署的项目上运行Nunit测试吗? Like after project has been deployed I have to run tests against the project on a deployed environment (because part of functionality can be run only on deployed environment due to the special access policy) 就像在部署项目后一样,我必须在已部署的环境中针对该项目运行测试(由于特殊的访问策略,部分功能只能在已部署的环境中运行)

Is there any way to run Nunit tests on deployed project? 有什么方法可以在已部署的项目上运行Nunit测试吗?

Normally NUnit is used to write unit tests against separate small functionalities of your application. 通常,NUnit用于针对应用程序的单独小功能编写单元测试。 If you want to run tests against a deployed version of your application then we are talking about integration tests. 如果要针对应用程序的已部署版本运行测试,那么我们正在谈论集成测试。 There are many different tools that can be used to test your running application. 有许多不同的工具可用于测试正在运行的应用程序。 One of them is Sikuli . 西Sikuli是其中之一。 Alternatively if you want to keep using a .NET unit testing platform but firing requests against a real web server you can checkout SpecFlow . 另外,如果您想继续使用.NET单元测试平台,但要针对真实的Web服务器触发请求,则可以签出SpecFlow But no matter which tool you decide to use, you should be ready to write integration tests which are very different in nature compared to your unit tests. 但是,无论您决定使用哪种工具,都应该准备编写与单元测​​试相比本质上非常不同的集成测试。

It is possible to run tests writen for Nunit against a deployed environment. 可以针对已部署的环境运行为Nunit编写的测试。 You need a way to configure your tests according to the environment to test. 您需要一种方法来根据要测试的环境配置测试。

The type of test: unit tests, integration tests, functional tests, system tests etc. is independent from the technology you use to run them. 测试的类型:单元测试,集成测试,功能测试,系统测试等与您运行它们所使用的技术无关。 NUnit is a technology to execute tests and gather their results. NUnit是一种执行测试并收集测试结果的技术。 It has probably been architectured thinking about unit tests, but you can even implement your system tests with it. 它可能是关于单元测试的体系结构,但是您甚至可以使用它来实现系统测试。

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

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