Получить отчет запуска
Получает отчет по выбранной тестовой сессии
- Параметры
- Расширенный вызов ?
Функция ПолучитьОтчетЗапуска(Знач URL, Знач Токен, Знач Проект, Знач IDЗапуска, Знач Формат = "pdf") Экспорт
| Параметр | CLI опция | Тип | Обяз. | Назначение |
|---|---|---|---|---|
| URL | --url | Строка | ✔ | URL сервера ReportPortal |
| Токен | --token | Строка | ✔ | Токен доступа |
| Проект | --proj | Строка | ✔ | ID проекта |
| IDЗапуска | --id | Число | ✔ | ID запуска |
| Формат | --format | Строка | ✖ | Формат отчета: pdf, xls, html |
Возвращаемое значение
ДвоичныеДанные - файл отчета
| Параметр | Описание |
|---|---|
| proxy | ИнтернетПрокси или структура полей Протокол, Сервер, Порт, Пользователь, Пароль, ИспользоватьАутентификациюОС |
| timeout | Таймаут выполнения запроса |
| adv_response | Оформляет ответ в виде полной структуры HTTP-ответа с полями code, body и headers |
| retries | Число попыток отправки HTTP-запроса при коде 5** или внутренних ошибках клиента |
| dontwait | Создает фоновое задание и возвращает его данные (только для 1С и OneScript) |
подсказка
Числовой ID запуска можно получить по UUID при помощи функции ПолучитьЗапуск
Пример использования для 1С:Предприят ие/OneScript
URL = "tests.openintegrations.dev";
Токен = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX25hbWUiOiJzdXBlcmFkbWluIiwic2NvcGVzIjpbInVpIl0sImV4cCI6MTc2MjAwMDI3NiwiaWF0IjoxNzYxOTEzODc2LCJqdGkiOiI0NTI3YTc5OS0wN2...";
IDЗапуска = "";
Проект = "Test";
Результат = OPI_ReportPortal.ПолучитьОтчетЗапуска(URL, Токен, Проект, IDЗапуска, "html");
- Bash
- CMD/Bat
oint rportal ПолучитьОтчетЗапуска \
--url "tests.openintegrations.dev" \
--token "***" \
--proj "Test" \
--id 254 \
--format "html"
oint rportal ПолучитьОтчетЗапуска ^
--url "tests.openintegrations.dev" ^
--token "***" ^
--proj "Test" ^
--id 254 ^
--format "html"
Результат
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html>\n<head>\n <title></title>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/>\n <style type=\"text/css\">\n a {text-decoration: none}\n </style>\n</head>\n<body text=\"#000000\" link=\"#000000\" alink=\"#000000\" vlink=\"#000000\">\n<table role=\"none\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n<tr><td width=\"50%\"> </td><td align=\"center\">\n\n<table id=\"JR_PAGE_ANCHOR_0_1\" role=\"none\" class=\"jrPage\" data-jr-height=\"533\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"empty-cells: show; width: 842px; border-collapse: collapse;\">\n<style type=\"text/css\">\n #JR_PAGE_ANCHOR_0_1 th {font-weight: normal;}\n #JR_PAGE_ANCHOR_0_1 ul {list-style-type: disc; padding-inline-start: 40px; margin: 0px;}\n #JR_PAGE_ANCHOR_0_1 ol {list-style-type: decimal; padding-inline-start: 40px; margin: 0px;}\n</style>\n<tr role=\"none\" valign=\"top\" style=\"height:0\">\n<td style=\"width:20px\"></td>\n<td style=\"width:90px\"></td>\n<td style=\"width:260px\"></td>\n<td style=\"width:50px\"></td>\n<td style=\"width:50px\"></td>\n<td style=\"width:50px\"></td>\n<td style=\"width:50px\"></td>\n<td style=\"width:50px\"></td>\n<td style=\"width:40px\"></td>\n<td style=\"width:40px\"></td>\n<td style=\"width:40px\"></td>\n<td style=\"width:40px\"></td>\n<td style=\"width:40px\"></td>\n<td style=\"width:22px\"></td>\n</tr>\n<tr valign=\"top\" style=\"height:20px\">\n<td colspan=\"14\">\n</td>\n</tr>\n<tr valign=\"top\" style=\"height:20px\">\n<td>\n</td>\n<td style=\"text-indent: 0px; text-align: left;\">\n<span style=\"font-family: Noto Sans; color: #000000; font-size: 10px; line-height: 1.3618164; font-weight: bold;\">Launch name:</span></td>\n<td style=\"text-indent: 0px; text-align: left;\">\n<span style=\"font-family: Noto Sans; color: #000000; font-size: 10px; line-height: 1.3618164; font-weight: bold;\">Test #161</span></td>\n<td>\n</td>\n<td colspan=\"9\" style=\"border: 1px solid #000000; text-indent: 0px; vertical-align: middle;text-align: center;\">\n<span style=\"font-family: Noto Sans; color: #000000; font-size: 10px; line-height: 1.3618164; font-weight: bold;\">Launch statistic</span></td>\n<td>\n</td>\n</tr>\n<tr valign=\"top\" style=\"height:20px\">\n<td>\n</td>\n<td style=\"text-indent: 0px; text-align: left;\">\n<span style=\"font-family: Noto Sans; color: #000000; font-size: 10px; line-height: 1.3618164; font-weight: bold;\">Description:</span></td>\n<td style=\"text-indent: 0px; text-align: left;\">\n<span style=\"font-family: Noto Sans; color: #000000; font-size: 10px; line-height: 1.3618164;\">New description Updated launch description</span></td>\n<td>\n</td>\n<td colspan=\"4\" style=\"border: 1px solid #000000; text-indent: 0px; vertical-align: middle;text-align: center;\">\n<span style=\"font-family: Noto Sans; color: #000000; font-size: 10px; line-height: 1.3618164; font-weight: bold;\">Execution statistic</span></td>\n<td colspan=\"5\" style=\"border: 1px solid #000000; text-indent: 0px; vertical-align: middle;text-align: center;\">\n<span style=\"font-family: Noto Sans; color: #000000; font-size: 10px; line-height: 1.3618164; font-weight: bold;\">Issue statistic</span></td>\n<td>\n</td>\n</tr>\n<tr valign=\"top\" style=\"height:20px\">\n<td>\n</td>\n<td style=\"text-indent: 0px; text-align: left;\">\n<span style=\"font-family: Noto Sans; color: #000000; font-size: 10px; line-height: 1.3618164; font-weight: bold;\">Owner:</span></td>\n<td style=\"text-indent: 0px; text-align: left;\">\n<span style=\"font-family: Noto Sans; color: #000000; font-size: 10px; line-height: 1.3618164;\">tester</span></td>\n<td>\n</td>\n<td style=\"background-color: #489BEB; border: 1px solid #000000; text-indent: 0px; vertical-align: middle;text-align: center;\">\n<span style=\"font-family: Noto Sans; color: #000000; font-size: 9px; line-height: 1.0px; font-weight: bold;\">Total</span></td>\n<td style=\"background-color: #87B77B; border: 1px solid #000000; text-indent: 0px; vertical-align: middle;text-align: center;\">\n<span style=\"font-family: Noto Sans; color: #000000; font-size: 9px; line-height: 1.3618164; font-weight: bold;\">Passed</span></td>\n<td style=\"background-color: #F36C4A; border: 1px solid #000000; text-indent: 0px; vertical-align: middle;text-align: center;\">\n<span style=\"font-family: Noto Sans; color: #000000; font-size: 9px; line-height: 1.3618164; font-weight: bold;\">Failed</span></td>\n<td style=\"background-color: #BDC7CC; border: 1px solid #000000; text-indent: 0px; vertical-align: middle;text-align: center;\">\n<span style=\"font-family: Noto Sans; color: #000000; font-size: 9px; line-height: 1.3618164; font-weight: bold;\">Skipped</span></td>\n<td style=\"background-color: #F7D63E; border: 1px solid #000000; text-indent: 0px; vertical-align: middle;text-align: center;\">\n<span style=\"font-family: Noto Sans; color: #000000; font-size: 9px; line-height: 1.3618164; font-weight: bold;\">AB</span></td>\n<td style=\"background-color: #EC3900; border: 1px solid #000000; text-indent: 0px; vertical-align: middle;text-align: center;\">\n<span style=\"font-family: Noto Sans; color: #000000; font-size: 9px; line-height: 1.3618164; font-weight: bold;\">PB</span></td>\n<td style=\"background-color: #0274D1; border: 1px solid #000000; text-indent: 0px; vertical-align: middle;text-align: center;\">\n<span style=\"font-family: Noto Sans; color: #000000; font-size: 9px; line-height: 1.3618164; font-weight: bold;\">SI</span></td>\n<td style=\"background-color: #BDC7CC; border: 1px solid #000000; text-indent: 0px; vertical-align: middle;text-align: center;\">\n<span style=\"font-family: Noto Sans; color: #000000; font-size: 9px; line-height: 1.3618164; font-weight: bold;\">ND</span></td>\n<td style=\"background-color: #FFB743; border: 1px solid #000000; text-indent: 0px; vertical-align: middle;text-align: center;\">\n<span style=\"font-family: Noto Sans; color: #000000; font-size: 9px; line-height: 1.3618164; font-weight: bold;\">TI</span></td>\n<td>\n</td>\n</tr>\n<tr valign=\"top\" style=\"height:20px\">\n<td>\n</td>\n<td style=\"text-indent: 0px; text-align: left;\">\n<span style=\"font-family: Noto Sans; color: #000000; font-size: 10px; line-height: 1.3618164; font-weight: bold;\">Duration:</span></td>\n<td style=\"text-indent: 0px; text-align: left;\">\n<span style=\"font-family: Noto Sans; color: #000000; font-size: 10px; line-height: 1.3618164;\">10:00:36000</span></td>\n<td>\n</td>\n<td style=\"border: 1px solid #000000; text-indent: 0px; vertical-align: middle;text-align: center;\">\n<span style=\"font-family: Noto Sans; color: #000000; font-size: 9px; line-height: 1.3618164;\">0</span></td>\n<td style=\"border: 1px solid #000000; text-indent: 0px; vertical-align: middle;text-align: center;\">\n<span style=\"font-family: Noto Sans; color: #000000; font-size: 9px; line-height: 1.3618164;\">0</span></td>\n<td style=\"border: 1px solid #000000; text-indent: 0px; vertical-align: middle;text-align: center;\">\n<span style=\"font-family: Noto Sans; color: #000000; font-size: 9px; line-height: 1.3618164;\">0</span></td>\n<td style=\"border: 1px solid #000000; text-indent: 0px; vertical-align: middle;text-align: center;\">\n<span style=\"font-family: Noto Sans; color: #000000; font-size: 9px; line-height: 1.3618164;\">0</span></td>\n<td style=\"border: 1px solid #000000; text-indent: 0px; vertical-align: middle;text-align: center;\">\n<span style=\"font-family: Noto Sans; color: #000000; font-size: 9px; line-height: 1.3618164;\">0</span></td>\n<td style=\"border: 1px solid #000000; text-indent: 0px; vertical-align: middle;text-align: center;\">\n<span style=\"font-family: Noto Sans; color: #000000; font-size: 9px; line-height: 1.3618164;\">0</span></td>\n<td style=\"border: 1px solid #000000; text-indent: 0px; vertical-align: middle;text-align: center;\">\n<span style=\"font-family: Noto Sans; color: #000000; font-size: 9px; line-height: 1.3618164;\">0</span></td>\n<td style=\"border: 1px solid #000000; text-indent: 0px; vertical-align: middle;text-align: center;\">\n<span style=\"font-family: Noto Sans; color: #000000; font-size: 9px; line-height: 1.3618164;\">0</span></td>\n<td style=\"border: 1px solid #000000; text-indent: 0px; vertical-align: middle;text-align: center;\">\n<span style=\"font-family: Noto Sans; color: #000000; font-size: 9px; line-height: 1.3618164;\">0</span></td>\n<td>\n</td>\n</tr>\n<tr valign=\"top\" style=\"height:393px\">\n<td colspan=\"14\">\n</td>\n</tr>\n<tr valign=\"top\" style=\"height:20px\">\n<td colspan=\"10\">\n</td>\n<td colspan=\"2\" style=\"text-indent: 0px; text-align: right;\">\n<span style=\"font-family: SansSerif; color: #000000; font-size: 10px; line-height: 1.1640625;\">Page 1</span></td>\n<td style=\"text-indent: 0px; text-align: left;\">\n<span style=\"font-family: SansSerif; color: #000000; font-size: 10px; line-height: 1.1640625;\"> of 1</span></td>\n<td>\n</td>\n</tr>\n<tr valign=\"top\" style=\"height:20px\">\n<td colspan=\"14\">\n</td>\n</tr>\n</table>\n\n</td><td width=\"50%\"> </td></tr>\n</table>\n</body>\n</html>\n"