chore: skipping testrail report added if getting testrail error
This commit is contained in:
parent
6bbdff0691
commit
9d8a7dfbcc
|
@ -3,6 +3,7 @@ import typing
|
|||
from collections import namedtuple
|
||||
|
||||
import pytest
|
||||
import requests
|
||||
from testrail_api import TestRailAPI
|
||||
|
||||
import configs
|
||||
|
@ -33,6 +34,16 @@ def init_testrail_api(request):
|
|||
configs.testrail.USR,
|
||||
configs.testrail.PSW
|
||||
)
|
||||
|
||||
response = requests.get(
|
||||
configs.testrail.URL,
|
||||
auth=(configs.testrail.USR, configs.testrail.PSW),
|
||||
)
|
||||
|
||||
if response.status_code != 200:
|
||||
LOG.info('TestRail report skipped because of Testrail server error')
|
||||
return
|
||||
|
||||
test_cases = get_test_cases_in_session(request)
|
||||
test_run = get_test_run(configs.testrail.RUN_NAME)
|
||||
if not test_run:
|
||||
|
|
Loading…
Reference in New Issue