I'm developing an API in one of my C# library to upload the test result documents (such as log file, screenshots captured or any zip file) from the local folder to the desired test case number under the test plan on Test hub. I'm working with TFS 2018.
Can anyone please help me with the code snippet to implement this functionality.
At present I'm able to establish the connection with the server with the below lines of code:
VssClientCredentials vssClientCred = new VssClientCredentials();
vssClientCred.Storage = new VssClientCredentialStorage();
VssConnection connection = new VssConnection(new Uri("TestHubServerURL"), vssClientCred);
TestManagementHttpClient tManageHttp = connection.GetClient<TestManagementHttpClient>();
TestResultDocument tdoc = new TestResultDocument();
TestResultDocument tRun = tManageHttp.PublishTestResultDocumentAsync(tdoc, ProjectName, TestRunID).Result;
But now I'm stuck, I'm not getting a way to to implement "PublishTestResultDocumentAsync" or do I need to use any other way to implement this functionality?
I tried googling out but didn't get any help with any examples.
Thank you all in advance.