[TestInitialize] public void SetUp() {
I can get the name TestMethod, the result of the TestContext test. However, I want to get the testmethod stack in TestCleanup.
Secondly, I know that one of the ways to achieve this is to follow the steps of the break test method in the try / catch block and set an exception for the variable or property and abort it when it fails.
However, I do not want to wrap each test method in a try / catch block. Is there any other approach to cleaning?
I would offer a small detailed explanation or example, as I am new to MSTest and programming.
source share