我想使用Report Portal向.net client发送二进制附件。我该怎么办?
答案 0 :(得分:1)
示例在Tests项目中。
https://github.com/reportportal/client-net/blob/master/ReportPortal.Client.Tests/LogItem/LogItem.cs
查看CreateLogWithAttach
测试并查看代码。
var data = new byte[] { 1, 2, 3 };
var log = Service.AddLogItem(new AddLogItemRequest
{
TestItemId = _testId,
Text = "Log1",
Time = DateTime.UtcNow,
Level = LogLevel.Info,
Attach = new Attach("file1", "application/octet-stream", data)
});