diff --git a/src/TestFramework/TestFramework.Extensions/TestContext.cs b/src/TestFramework/TestFramework.Extensions/TestContext.cs index ca3f216205..168cdb77dc 100644 --- a/src/TestFramework/TestFramework.Extensions/TestContext.cs +++ b/src/TestFramework/TestFramework.Extensions/TestContext.cs @@ -84,30 +84,62 @@ public static TestContext? Current #region Test run deployment directories /// - /// Gets base directory for the test run, under which deployed files and result files are stored. + /// Gets the top-level directory for the test run, under which deployed files and result files are stored. /// + /// + /// + /// This is the root of the layout used by the other deployment directory properties. A typical run produces: + /// + /// + /// <solution>\TestResults\<run-guid> // TestRunDirectory + /// \In // ResultsDirectory and TestResultsDirectory + /// \<MachineName> // TestRunResultsDirectory + /// \Out // DeploymentDirectory + /// + /// public virtual string? TestRunDirectory => GetProperty(TestRunDirectoryLabel); /// - /// Gets directory for files deployed for the test run. Typically a subdirectory of . + /// Gets the directory for files deployed for the test run (the "Out" directory). This is typically the Out subdirectory of . /// + /// + /// When app domains are disabled, this can instead point at the test assembly directory. + /// public virtual string? DeploymentDirectory => GetProperty(DeploymentDirectoryLabel); /// - /// Gets base directory for results from the test run. Typically a subdirectory of . + /// Gets the base directory for results from the test run (the "In" directory). This is typically the In subdirectory of . /// + /// + /// In the current implementation this returns the same path as (the In directory). + /// When run directory information is unavailable, the platform services layer can fall back to the application base directory. + /// public virtual string? ResultsDirectory => GetProperty(ResultsDirectoryLabel); /// - /// Gets directory for test run result files. Typically a subdirectory of . + /// Gets the per-machine directory for test run result files. This is the <MachineName> subdirectory of + /// (i.e. In\<MachineName>). /// + /// + /// + /// Despite the similar names, this directory is typically a child of , not the other way around. + /// For example, with set to ...\In on a machine named BUILD01: + /// + /// + /// TestResultsDirectory => ...\In + /// TestRunResultsDirectory => ...\In\BUILD01 + /// + /// + /// When run directory information is unavailable, the platform services layer can return the same path for both properties. + /// + /// public virtual string? TestRunResultsDirectory => GetProperty(TestRunResultsDirectoryLabel); /// - /// Gets directory for test result files. + /// Gets the directory for test result files (the "In" directory). This is the same path as + /// and is typically the parent of . When run directory information is unavailable, + /// the platform services layer can return the same path for both properties. /// - // In MSTest, it is actually "In\697105f7-004f-42e8-bccf-eb024870d3e9\User1", but we are setting it to "In" only - // because MSTest does not create the GUID directory. public virtual string? TestResultsDirectory => GetProperty(TestResultsDirectoryLabel); #endregion