How to run unit testing tests from command line?

后端 未结 4 594
走了就别回头了
走了就别回头了 2020-12-13 17:25

I googled and found the below helpful references. Currently I want to run all from the command-line (for easy of execution & quickness) in cases:

  1. A specifi
4条回答
  •  执念已碎
    2020-12-13 17:42

    Currently I can have some answers for my needs:

    1. A specific test (ie. a test written by a method marked [TestMethod()])
      Use MSTest.exe /container:TheAssemblyContainingYourSpecificTest /test:TheSpecificTestName

    2. All tests in a class
      Use MSTest.exe /container:TheAssemblyContainingYourClass /test:TheClassNameWithFullNamespace
      Note that the /test: is the filter which uses the full name of the class when filtering.

    The others are still left unknown. Please disscuss if you know how.

提交回复
热议问题