2022-08-24 15:01:07 +00:00
|
|
|
import os
|
|
|
|
|
2022-08-24 11:41:11 +00:00
|
|
|
from reporter.allure_reporter import AllureReporter
|
|
|
|
from reporter.dummy_reporter import DummyReporter
|
|
|
|
from reporter.interfaces import Reporter
|
2022-08-24 15:01:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
def get_reporter() -> Reporter:
|
|
|
|
# TODO: in scope of reporter implementation task here we will have extendable
|
|
|
|
# solution for configuring and providing reporter for the library
|
|
|
|
if os.getenv("TESTLIB_REPORTER_TYPE", "DUMMY") == "DUMMY":
|
|
|
|
return DummyReporter()
|
|
|
|
else:
|
|
|
|
return AllureReporter()
|