Skip to main content

Write log

Adds execution information for the test item

Function WriteLog(Val URL, Val Token, Val Project, Val LogStructure) Export

ParameterCLI optionTypeRequiredDescription
URL--urlStringReportPortal server URL
Token--tokenStringAccess token
Project--projStringProject ID
LogStructure--paramsStructure Of KeyAndValueExecution information. See GetLogStructure
Returns

Map Of KeyAndValue - serialized JSON response from ReportPortal

1C:Enterprise/OneScript code example
URL = "tests.openintegrations.dev";
Token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX25hbWUiOiJzdXBlcmFkbWluIiwic2NvcGVzIjpbInVpIl0sImV4cCI6MTc2MjAwMDI3NiwiaWF0IjoxNzYxOTEzODc2LCJqdGkiOiI0NTI3YTc5OS0wN2...";
LaunchID = "";
ElementID = "";
Project = "Test";
Time = Date("20260101100010");
Text = "Some log 1";

LogStructure = OPI_ReportPortal.GetLogStructure(LaunchID, ElementID, Time, Text);
# JSON data can also be passed as a path to a .json file

oint rportal WriteLog \
--url "tests.openintegrations.dev" \
--token "***" \
--proj "Test" \
--params "{'launchUuid':'05226b08-ff9f-4f35-806b-7e6af60beac0','itemUuid':'3e0f1291-a2b9-4853-9aaf-a2adf02fcd6a','time':'1767258010','message':'Some log 1','level':'info'}"
Result
{
"id": "11e0c348-0335-460b-a1f4-5e70c0ab0f96"
}