从Pex自动创建NUnit测试用例 [英] Create NUnit test cases automatically from Pex
本文介绍了从Pex自动创建NUnit测试用例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要从.Net解决方案文件自动创建NUnit测试案例。
Morover这个需要做,从命令行。
我听说Pex自动创建测试用例。
让我们知道
I need to create the NUnit Test case automatically from my .Net Solution file. Morover this needs to be done , from command line. I heard Pex create test cases automatically. Let know
推荐答案
以下步骤应该可以帮助您:
The following steps should get you there:
- 在测试项目中添加对Pex.NUnit.dll的引用
- 在测试项目的AssemblyInfo.cs中,添加属性< $ c> [assembly:Pex.NUnit.PexNUnitPackage]
- 构建解决方案(从Visual Studio或从命令行使用msbuild)
- 从命令行运行Pex:
pex.exe bin \Debug\TestProjectName.dll
- 测试位于
reports\TestProjecName。#####。##### \tests
。
- Add a reference to Pex.NUnit.dll in your test project
- In your test project's AssemblyInfo.cs, add the attribute -
[assembly: Pex.NUnit.PexNUnitPackage]
- Build your solution (either from Visual Studio or using msbuild from the command line)
- run Pex from the command line:
pex.exe bin\Debug\TestProjectName.dll
- The tests are placed under
reports\TestProjecName.#####.#####\tests
.
这篇关于从Pex自动创建NUnit测试用例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文