M
MbProgstar
Guest
I have TestMethod in my unit test:
[TestMethod]
public void TestLast()
{
var path = AppDomain.CurrentDomain.SetupInformation.ApplicationBase ;
Console.WriteLine(path);
}
I have inserted this TestMethod in an orderedTest file: OrderedTest1.orderedtest
I want to get the directory when the test is run. When I check the path variable in the method when running the TestLast directly in Visual Studio, I get the path of the Debug folder (as I am debugging):
C:\Users\dada\Visual Studio 2015\Projects\TestTest\UnitTestProject2\bin\Debug
But when I run the OrderedTest1.orderedtest in Debug mode in Visual Studio, I get a different value for path variable:
C:\Users\dada\Visual Studio 2015\Projects\TestTest\TestResults\dada_MyMachineName 2020-03-05 17_12_14\Out
Why is this like this and how can get the path of the Debug folder when debugging the orderedTest (without manually chaning the path)?
Continue reading...
[TestMethod]
public void TestLast()
{
var path = AppDomain.CurrentDomain.SetupInformation.ApplicationBase ;
Console.WriteLine(path);
}
I have inserted this TestMethod in an orderedTest file: OrderedTest1.orderedtest
I want to get the directory when the test is run. When I check the path variable in the method when running the TestLast directly in Visual Studio, I get the path of the Debug folder (as I am debugging):
C:\Users\dada\Visual Studio 2015\Projects\TestTest\UnitTestProject2\bin\Debug
But when I run the OrderedTest1.orderedtest in Debug mode in Visual Studio, I get a different value for path variable:
C:\Users\dada\Visual Studio 2015\Projects\TestTest\TestResults\dada_MyMachineName 2020-03-05 17_12_14\Out
Why is this like this and how can get the path of the Debug folder when debugging the orderedTest (without manually chaning the path)?
Continue reading...