public void TrxReader_SingleAttachment_AbsolutePath() { // Arrange string testDir = TestUtils.CreateTestSpecificFolder(this.TestContext); string resultsDir = TestUtils.CreateTestSpecificFolder(this.TestContext, "TestResults"); string coverageFileName = "x:\\dir1\\dir2\\xxx.coverage"; string textFile = CreateTextFile(resultsDir, "single_attachment.trx", @"<?xml version=""1.0"" encoding=""UTF-8""?> <TestRun id=""eb906034-f363-4bf0-ac6a-29fa47645f67"" name=""LOCAL SERVICE@MACHINENAME 2015-05-06 08:38:39"" runUser=""NT AUTHORITY\LOCAL SERVICE"" xmlns=""http://microsoft.com/schemas/VisualStudio/TeamTest/2010""> <ResultSummary outcome=""Completed""> <Counters total=""123"" executed=""123"" passed=""123"" failed=""0"" error=""0"" timeout=""0"" aborted=""0"" inconclusive=""0"" passedButRunAborted=""0"" notRunnable=""0"" notExecuted=""0"" disconnected=""0"" warning=""0"" completed=""0"" inProgress=""0"" pending=""0"" /> <RunInfos /> <CollectorDataEntries> <Collector agentName=""MACHINENAME"" uri=""datacollector://microsoft/CodeCoverage/2.0"" collectorDisplayName=""Code Coverage""> <UriAttachments> <UriAttachment> <A href=""{0}""> </A> </UriAttachment> </UriAttachments> </Collector> </CollectorDataEntries> </ResultSummary> </TestRun>", coverageFileName); TestLogger logger = new TestLogger(); // Act string coverageFilePath = TrxFileReader.LocateCodeCoverageFile(testDir, logger); // Assert Assert.AreEqual(coverageFilePath, coverageFilePath); logger.AssertDebugMessageExists(coverageFileName); }