从Pex自动创建NUnit测试用例 [英] Create NUnit test cases automatically from Pex

查看:210
本文介绍了从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:


  1. 在测试项目中添加对Pex.NUnit.dll的引用

  2. 在测试项目的AssemblyInfo.cs中,添加属性< $ c> [assembly:Pex.NUnit.PexNUnitPackage]

  3. 构建解决方案(从Visual Studio或从命令行使用msbuild)

  4. 从命令行运行Pex: pex.exe bin \Debug\TestProjectName.dll

  5. 测试位于 reports\TestProjecName。#####。##### \tests

  1. Add a reference to Pex.NUnit.dll in your test project
  2. In your test project's AssemblyInfo.cs, add the attribute - [assembly: Pex.NUnit.PexNUnitPackage]
  3. Build your solution (either from Visual Studio or using msbuild from the command line)
  4. run Pex from the command line: pex.exe bin\Debug\TestProjectName.dll
  5. The tests are placed under reports\TestProjecName.#####.#####\tests.

您可以在使用Microsoft Pex进行参数化单元测试

这篇关于从Pex自动创建NUnit测试用例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆