English 中文(简体)
将习俗论作为指挥线论点,由她主持。 快速指挥或通过批次档案
原标题:Passing custom arguments as Command-line argument by running the MsTest.exe command prompt or via bat file
  • 时间:2011-10-13 10:51:35
  •  标签:
  • mstest

My need is to Pass a custom arguments/Parameter to the unit test when running via the MsTest in the Command-line. The argument must be as command line argument and need to access the param value inside the test class or method.

问题回答

The MSTest command line does not support this option. Please look for a way to:

  1. create a text or configuration file
  2. start mstest
  3. read that file from within your test.

A similar suggestion is posted in MSTest Command Line Settings.

在你对Kroonwijk的评论中,你说,你重新试图在试验中具体注明一个组合文件。 我过去处理这一情况的方式是,在“试验”部分与我在组合管理人中设置的组合名称相对应的情况下,创建一些“评议”转变(例如,“试验”部分)。 然后,当我利用这一特定组合时,就适用了适当的变革,而由此而产生的冲突档案具有我所需要的价值。





相关问题
Invoke callback in Moq

I have a method that performs an asynchronous service call. I call this class by passing in the callback. public void GetRights(EventHandler<GetRightsCompletedEventArgs> callback) { ...

Fluent NHibernate PersistenceSpecification CheckList

I am currently working on a college project in which we are using Fluent NHibernate. I am working on figuring how to create testing for our entities and Fluent mappings. I have, however, hit a dead ...

Why does Assert.AreEqual(1.0, double.NaN, 1.0) pass?

Short question, why does Assert.AreEqual(1.0, double.NaN, 1.0) pass? Whereas Assert.AreEqual(1.0, double.NaN) fails. Is it a bug in MSTest (Microsoft.VisualStudio.QualityTools.UnitTestFramework) or ...

Migrate from MSTest to XUnit

We are thinking about moving our tests from MSTest to XUnit. Is there any migration application that takes a MSTest and migrates it to XUnit? Also, if not, what should I look out for when doing this?...

Unit Testing .NET 3.5 projects using MStest in VS2010

There s a bug/feature in Visual Studio 2010 where you can t create a unit test project with the 2.0 CLR. https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=483891&wa=...

Repeat mstest test run multiple times

Some of my mstest unit tests help detect multi-threading race conditions, and as such they are most useful when run many times in a row, but I only want to do this for specific test runs -- not all ...

热门标签