univention.testing.format package#
Import all UCS Test formatters.
Submodules#
univention.testing.format.html module#
Format UCS Test results as HTML.
- class univention.testing.format.html.HTML(stream: ~typing.IO[str] = <colorama.ansitowin32.StreamWrapper object>)[source]#
Bases:
TestFormatInterfaceCreate simple HTML report.
- begin_run(environment: TestEnvironment, count: int = 1) None[source]#
Called before first test.
- end_test(result: TestResult) None[source]#
Called after each test.
- format(result: TestResult) None[source]#
Format single test.
>>> from univention.testing.data import TestCase >>> te = TestEnvironment() >>> tc = TestCase('python/data.py') >>> tr = TestResult(tc, te) >>> tr.success() >>> HTML().format(tr)
univention.testing.format.jenkins module#
Format UCS Test results as Jenkins report.
- class univention.testing.format.jenkins.Jenkins(stream: ~typing.IO[str] = <colorama.ansitowin32.StreamWrapper object>)[source]#
Bases:
TestFormatInterfaceCreate Jenkins report. <https://wiki.jenkins-ci.org/display/JENKINS/Monitoring+external+jobs>
- end_test(result: TestResult) None[source]#
Called after each test.
- format(result: TestResult) None[source]#
>>> from univention.testing.data import TestCase, TestEnvironment >>> te = TestEnvironment() >>> tc = TestCase('python/data.py') >>> tr = TestResult(tc, te) >>> tr.success() >>> Jenkins().format(tr)
univention.testing.format.junit module#
Format UCS Test results as JUnit report.
- class univention.testing.format.junit.Junit(stream: ~typing.IO[str] = <colorama.ansitowin32.StreamWrapper object>)[source]#
Bases:
TestFormatInterfaceCreate Junit report. <http://windyroad.org/dl/Open%20Source/JUnit.xsd>
- end_test(result: TestResult) None[source]#
Called after each test.
- format(result: TestResult) None[source]#
>>> from univention.testing.data import TestEnvironment >>> te = TestEnvironment() >>> tc = TestCase('python/data.py') >>> tr = TestResult(tc, te) >>> tr.success() >>> Junit().format(tr)
univention.testing.format.tap module#
Format UCS Test results as Test Anything Protocol report.
- class univention.testing.format.tap.TAP(stream: ~typing.IO[str] = <colorama.ansitowin32.StreamWrapper object>)[source]#
Bases:
TestFormatInterfaceCreate simple Test-Anything-Protocol report. <http://testanything.org/wiki/index.php/Main_Page>
- begin_run(environment: TestEnvironment, count: int = 1) None[source]#
Called before first test.
- end_test(result: TestResult) None[source]#
Called after each test.
- format(result: TestResult) None[source]#
>>> from univention.testing.data import TestCase >>> te = TestEnvironment() >>> tc = TestCase('python/data.py') >>> tr = TestResult(tc, te) >>> tr.success() >>> TAP().format(tr) 1..1
univention.testing.format.text module#
Format UCS Test results as simple text report.
- class univention.testing.format.text.Raw(stream: ~typing.IO[str] = <colorama.ansitowin32.StreamWrapper object>)[source]#
Bases:
TextCreate simple text report with raw file names.
- class univention.testing.format.text.Text(stream: ~typing.IO[str] = <colorama.ansitowin32.StreamWrapper object>)[source]#
Bases:
TestFormatInterfaceCreate simple text report.
- begin_run(environment: TestEnvironment, count: int = 1) None[source]#
Called before first test.
- end_test(result: TestResult, end: str = '\n') None[source]#
Called after each test.
- format(result: TestResult) None[source]#
>>> te = TestEnvironment() >>> tc = TestCase('python/data.py') >>> tr = TestResult(tc, te) >>> tr.success() >>> import io >>> s = io.StringIO() >>> Text(s).format(tr)