Remote Launch SDK - is it possible to return test run Attachments inside AutomatedTestRun4 class

Wednesday, November 9, 2016
Avatar
Hi,

I'm using SpiraSDK, namely the part of AutomationEngine to make my own plugin for RemoteLaunch. So far I was quite successful.

Although I'd like to return some attachments of testrun to Spira. However there was no example in SDK (except the one for screenshots) I tried to use .AttachedDocuments class hoping that SPIRA server will poll the data out once the test run finishes, similar as it is for .TestRunSteps.

The point is, one can not known which of AutomatedTest4 members are supposed to be used as In or Out for the purpose of StartExecutin() method. Is it possible to use .AttachedDocuments to transfer files from Remote launch plugin back to Spira? This makes me sence.

See the example code I use:


var attachment = new AttachedDocument();
byte[] data = null;
attachment.BinaryData = data;
attachment.FilenameOrUrl = filePath;
attachment.ProjectAttachmentFolderId = 147;
attachment.ProjectAttachmentTypeId = 21;
attachment.CurrentVersion = "1.0";
attachment.EditedDate = DateTime.Now;
attachment.UploadDate= DateTime.Now;
attachment.TestCaseId = automatedTestRun.TestCaseId;
attachment.Type = AttachedDocument.AttachmentType.File;
automatedTestRun.AttachedDocuments.Add(attachment);
1 Replies
Sunday, November 13, 2016
Avatar
inflectra.jimx
re: josef.vopicka Wednesday, November 9, 2016
Hi Josef

I'm glad that you've been able to create a plugin for RemoteLaunch, that is great.

I have checked with our development team and the .AttachedDocuments class is only used to provide documents/files TO the executing test (i.e. from the SpiraTest test case), it is not used to get documents FROM the executing test. Those documents should be sent back using the .Screenshots collection instead. Despite its name, it's able to attach any kind of file/document, not just screenshots and images. Sorry for any confusion!

Regards

Jim

Spira Helps You Deliver Quality Software, Faster and With Lower Risk

And if you have any questions, please email or call us at +1 (202) 558-6885

 

Statistics
  • Started: Wednesday, November 9, 2016
  • Last Reply: Sunday, November 13, 2016
  • Replies: 1
  • Views: 5274