Write log
Adds execution information for the test item
- Parameters
- Advanced call ?
Function WriteLog(Val URL, Val Token, Val Project, Val LogStructure) Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| URL | --url | String | ✔ | ReportPortal server URL |
| Token | --token | String | ✔ | Access token |
| Project | --proj | String | ✔ | Project ID |
| LogStructure | --params | Structure Of KeyAndValue | ✔ | Execution information. See GetLogStructure |
Returns
Map Of KeyAndValue - serialized JSON response from ReportPortal
| Parameter | Description |
|---|---|
| proxy | InternetProxy or a structure with fields Protocol, Host, Port, User, Password, UseOSAuthentication |
| timeout | Request execution timeout |
| adv_response | Formats the response as a complete HTTP structure with fields code, body, and headers |
| retries | Number of HTTP request send attempts on 5** status codes or internal client errors |
| dontwait | Creates a background job and returns its data (for 1C and OneScript only) |
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);
- Bash
- CMD/Bat
# 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':'c8266461-6880-4e4c-98fe-dab7d33b3dfb','itemUuid':'a67a631a-6bbe-446d-8ce5-cd105fdb8ed7','time':'1767258010','message':'Some log 1','level':'info'}"
:: 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':'c8266461-6880-4e4c-98fe-dab7d33b3dfb','itemUuid':'a67a631a-6bbe-446d-8ce5-cd105fdb8ed7','time':'1767258010','message':'Some log 1','level':'info'}"
Result
{
"id": "c184f8aa-956d-4707-b55b-ce4a3ad7d3aa"
}