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 ...
How to properly make use of TestContext.Properties
stackoverflow.com › questions › 51364570Jul 16, 2018 · To use the file : test.runsettings 1-You have to Manually select the run stting file In the IDE, select Test > Configure Run Settings > Select Solution Wide runsettings File, and then select the .runsettings file. 2-Set a build property you have specify the run settings file for the project by the property : RunSettingsFilePath reference Share