{"action":"closed","issue":{"url":"https://api.github.com/repos/reportportal/agent-net-vstest/issues/35","repository_url":"https://api.github.com/repos/reportportal/agent-net-vstest","labels_url":"https://api.github.com/repos/reportportal/agent-net-vstest/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/reportportal/agent-net-vstest/issues/35/comments","events_url":"https://api.github.com/repos/reportportal/agent-net-vstest/issues/35/events","html_url":"https://github.com/reportportal/agent-net-vstest/issues/35","id":494157202,"node_id":"MDU6SXNzdWU0OTQxNTcyMDI=","number":35,"title":"How to get testItem id (vstest, c#)","user":{"login":"heilwood","id":27227165,"node_id":"MDQ6VXNlcjI3MjI3MTY1","avatar_url":"https://avatars3.githubusercontent.com/u/27227165?v=4","gravatar_id":"","url":"https://api.github.com/users/heilwood","html_url":"https://github.com/heilwood","followers_url":"https://api.github.com/users/heilwood/followers","following_url":"https://api.github.com/users/heilwood/following{/other_user}","gists_url":"https://api.github.com/users/heilwood/gists{/gist_id}","starred_url":"https://api.github.com/users/heilwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heilwood/subscriptions","organizations_url":"https://api.github.com/users/heilwood/orgs","repos_url":"https://api.github.com/users/heilwood/repos","events_url":"https://api.github.com/users/heilwood/events{/privacy}","received_events_url":"https://api.github.com/users/heilwood/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2019-09-16T08:21:52Z","updated_at":"2019-09-16T16:38:49Z","closed_at":"2019-09-16T16:38:49Z","author_association":"NONE","body":"How to find current testItemId, i'm using ReportPortal VStest logger to send items to reportportal, i found example with NUnit.\r\n\r\n            private void ReportPortalListener_AfterTestStarted(object sender, TestItemStartedEventArgs e)\r\n            {\r\n                e.TestReporter.Log(new ReportPortal.Client.Requests.AddLogItemRequest\r\n                {\r\n                    Level = ReportPortal.Client.Models.LogLevel.Trace,\r\n                    Time = DateTime.UtcNow,\r\n                    Text = \"This message is from 'ReportPortalListener_AfterTestStarted' event.\"\r\n                });\r\n            }\r\n\r\n            Bridge.Service.AddLogItemAsync(new AddLogItemRequest\r\n            {\r\n                TestItemId = e.TestReporter.TestId,\r\n                Text = \"Screenshot\",\r\n                Time = DateTime.UtcNow,\r\n                Attach = new Attach(\"Image\", \"image/jpeg\", imgdata),\r\n                Level = LogLevel.Info\r\n            });\r\n\r\nCannot figure out how to add attachment to the test. (Test adapter specrun)\r\n\r\nThank you!\r\n\r\n\r\n"}}
{"actor":{"display_login":"nvborisenko"}}