private void SaveAttachmentsToTestContext(string[] filePaths) { if (filePaths != null) { foreach (var filePath in filePaths) { LogTest.Info("Uploading file [{0}] to test context", filePath); TestContext.AddResultFile(filePath); } } }
private void SaveAttachmentsToTestContext(string[] filePaths) { if (filePaths != null) { foreach (var filePath in filePaths) { LogTest.Info("Uploading file [{0}] to test context", filePath); try { TestContext.AddTestAttachment(filePath); } catch { LogTest.Error("Error uploading file [{0}] to test context", filePath); throw; } } } }