{"action":"created","issue":{"url":"https://api.github.com/repos/nunit/nunit3-vs-adapter/issues/526","repository_url":"https://api.github.com/repos/nunit/nunit3-vs-adapter","labels_url":"https://api.github.com/repos/nunit/nunit3-vs-adapter/issues/526/labels{/name}","comments_url":"https://api.github.com/repos/nunit/nunit3-vs-adapter/issues/526/comments","events_url":"https://api.github.com/repos/nunit/nunit3-vs-adapter/issues/526/events","html_url":"https://github.com/nunit/nunit3-vs-adapter/issues/526","id":337946939,"node_id":"MDU6SXNzdWUzMzc5NDY5Mzk=","number":526,"title":"Missing Screenshot attachment in VSTS but see a path in .trx","user":{"login":"CharliePoole","id":2678661,"node_id":"MDQ6VXNlcjI2Nzg2NjE=","avatar_url":"https://avatars2.githubusercontent.com/u/2678661?v=4","gravatar_id":"","url":"https://api.github.com/users/CharliePoole","html_url":"https://github.com/CharliePoole","followers_url":"https://api.github.com/users/CharliePoole/followers","following_url":"https://api.github.com/users/CharliePoole/following{/other_user}","gists_url":"https://api.github.com/users/CharliePoole/gists{/gist_id}","starred_url":"https://api.github.com/users/CharliePoole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CharliePoole/subscriptions","organizations_url":"https://api.github.com/users/CharliePoole/orgs","repos_url":"https://api.github.com/users/CharliePoole/repos","events_url":"https://api.github.com/users/CharliePoole/events{/privacy}","received_events_url":"https://api.github.com/users/CharliePoole/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-03T15:22:17Z","updated_at":"2018-07-08T14:46:55Z","closed_at":null,"author_association":"MEMBER","body":"@charleshamel73 commented on [Mon Jul 02 2018](https://github.com/nunit/nunit/issues/2918)\n\nHello,\r\nI am currently working with:\r\nVSTestV2\r\nVSTS \r\nVisual Studio 2017\r\nNUnit 3.10.*\r\n\r\nWhile using the `TestContext.AddTestAttachment(fullFilePath)` function, I see an attachment within the .trx file but that attachment isn't shown within test attachments page. I have tried to fix the path to be the test run settings but nothing is working. I have attached a screenshot of the Code and the Attachments Page without the attached screenshot\r\n```csharp\r\n if (TestContext.CurrentContext.Result.Outcome != ResultState.Success)\r\n {\r\n     String baseTestDir = TestContext.CurrentContext.WorkDirectory;\r\n     if ( environment.HasEnvironmentValue(\"SYSTEM_DEFAULTWORKINGDIRECTORY\"))\r\n     {\r\n         baseTestDir = String.Format(\"{0}\\\\TestResults\",environment.GetEnvironmentValue(\"SYSTEM_DEFAULTWORKINGDIRECTORY\"));\r\n     }\r\n     String fullFilePath = String.Format(\"{0}\\\\{1}.png\", baseTestDir, TestContext.CurrentContext.Test.FullName);\r\n     log.Info(String.Format(\"Test has failed. Taking Screenshot and writing it to '{0}'\", fullFilePath));\r\n     Screenshot screenshot = driver.GetScreenshot();\r\n     screenshot.SaveAsFile(fullFilePath, ScreenshotImageFormat.Png);\r\n     TestContext.AddTestAttachment(fullFilePath);\r\n }\r\n```\r\n\r\nAnyone have any idea what I might be missing?\n\n---\n\n@charleshamel73 commented on [Mon Jul 02 2018](https://github.com/nunit/nunit/issues/2918#issuecomment-401941565)\n\nUpdate* I did found out that VSTestV2 has a very specific folder to which it looks for attachements in \r\n```\r\n2018-07-02T20:16:31.6086833Z ##[debug]Reading test results from file 'D:\\a\\1\\s\\TestResults\\VssAdministrator_*_2018-07-02_20_15_38.trx'.\r\n2018-07-02T20:16:31.6117584Z ##[debug]Setting run start and finish times.\r\n2018-07-02T20:16:31.6166434Z ##[debug]Attachment location: D:\\a\\1\\s\\TestResults\\VssAdministrator_*_2018-07-02_20_15_38\\In.\r\n2018-07-02T20:16:31.6314450Z ##[debug]Total test results: 4.\r\n```\n\n---\n\n@mikkelbu commented on [Mon Jul 02 2018](https://github.com/nunit/nunit/issues/2918#issuecomment-401951772)\n\nHi @charleshamel73. I don't think I can help you, as I know very little about VSTestV2 and VSTS, but I just wanted you to tell you that I've edited the code blocks to make them read nicer (by using [fenced code blocks](https://help.github.com/articles/creating-and-highlighting-code-blocks/)).\n\n---\n\n@CharliePoole commented on [Mon Jul 02 2018](https://github.com/nunit/nunit/issues/2918#issuecomment-401971593)\n\n@charleshamel73 This seems to be an issue for the NUnit 3 VS adapter, rather than the framework. We can move it there so the right people see it if you agree.\n\n---\n\n@charleshamel73 commented on [Tue Jul 03 2018](https://github.com/nunit/nunit/issues/2918#issuecomment-402189581)\n\nYes That would be great if you could. Even if this is just a problem on my end, i would like other users to at least be able to refer to this thread and be able to find a solution\n\n"},"comment":{"url":"https://api.github.com/repos/nunit/nunit3-vs-adapter/issues/comments/403292758","html_url":"https://github.com/nunit/nunit3-vs-adapter/issues/526#issuecomment-403292758","issue_url":"https://api.github.com/repos/nunit/nunit3-vs-adapter/issues/526","id":403292758,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMzI5Mjc1OA==","user":{"login":"OsirisTerje","id":203432,"node_id":"MDQ6VXNlcjIwMzQzMg==","avatar_url":"https://avatars0.githubusercontent.com/u/203432?v=4","gravatar_id":"","url":"https://api.github.com/users/OsirisTerje","html_url":"https://github.com/OsirisTerje","followers_url":"https://api.github.com/users/OsirisTerje/followers","following_url":"https://api.github.com/users/OsirisTerje/following{/other_user}","gists_url":"https://api.github.com/users/OsirisTerje/gists{/gist_id}","starred_url":"https://api.github.com/users/OsirisTerje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OsirisTerje/subscriptions","organizations_url":"https://api.github.com/users/OsirisTerje/orgs","repos_url":"https://api.github.com/users/OsirisTerje/repos","events_url":"https://api.github.com/users/OsirisTerje/events{/privacy}","received_events_url":"https://api.github.com/users/OsirisTerje/received_events","type":"User","site_admin":false},"created_at":"2018-07-08T14:46:55Z","updated_at":"2018-07-08T14:46:55Z","author_association":"MEMBER","body":"Can this be a duplicate of #494?   @charleshamel73  Would be nice if you could check out the latest development package from our myget feed which has 494 fixed.  See https://www.myget.org/feed/nunit/package/nuget/NUnit3TestAdapter  , version 3.11.0-dev-00894 "}}
{"actor":{"display_login":"OsirisTerje"}}