c# - Understanding the MSTest TestContext - Stack Overflow
stackoverflow.com › questions › 24249133Jun 17, 2014 · You can get this from the TestContext.TestName property. I found an unexpected difference in behaviour between a static TestContext that is passed in to the [ClassInitialize] method and one that is declared as a public property (and gets set by the test runner). Consider the following code: using System; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace TestContext.Tests { [TestClass] public class UnitTest1 { public TestContext TestContext { get; set; } private static ...
Using testContext
social.msdn.microsoft.com › Forums › en-USDec 27, 2015 · For example, I have a Test function in my wpf classes, I will create a test method for this function with a Unit Test Class. Then please initialize the TestContext in Test Class and Timer as I mentioned in my previous post and the sample project. After that, we can add the Unit Test into Load Test. It is the same with the Unit Test.
TestContext | NUnit Docs
docs.nunit.org › writing-tests › TestContextTest parameters may be supplied to a run in various ways, depending on the runner used. For example, the console runner provides a command-line argument and v3.4 of the NUnit 3 VS Adapter will supports specifying them in a .runsettings file. The static TestParameters property returns an object representing those passed-in parameters.