|
| 1 | +from .testreporter import AddTestReporter, AddBuildReporter, AddTestPlanReporter, AddPlatformReporter, TestReporter |
| 2 | + |
| 3 | + |
| 4 | +class TestGenReporter(AddTestReporter, AddBuildReporter, AddTestPlanReporter, AddPlatformReporter, TestReporter): |
| 5 | + """ |
| 6 | + This is the default generate everything it can version of test reporting. |
| 7 | +
|
| 8 | + This class will always try to report a result. It will generate everything possible and will change with additional |
| 9 | + Add*Reporter's added to the repo. As such you should only use this if you want to always generate everything this |
| 10 | + repo is capable of. If you want what it does at any specific time you should create this class in your project and |
| 11 | + use directly. |
| 12 | +
|
| 13 | + If you don't want to generate one of these values you can 'roll your own' version of this class with only the |
| 14 | + needed features that you want to generate. As stated above if you *only* want to generate what this class currently |
| 15 | + does. Copying it into your project is the best practice as this class is mutable inside the project! |
| 16 | +
|
| 17 | + For example if you wanted to add platforms and/or tests to testplans, but didn't want to ever make a new testplan |
| 18 | + you could use a class like: |
| 19 | + `type('MyOrgTestGenReporter', (AddTestReporter, AddPlatformReporter, TestReporter), {})` |
| 20 | +
|
| 21 | + Example usage with fake testlink server test and a manual project. |
| 22 | + ``` |
| 23 | + tls = testlink.TestLinkHelper('https://testlink.corp.com/testlink/lib/api/xmlrpc/v1/xmlrpc.php', |
| 24 | + 'devkeyabc123').connect(testlink.TestlinkAPIClient) |
| 25 | + tgr = TestGenReporter(tls, ['TEST-123'], testprojectname='MANUALLY_MADE_PROJECT', testplanname='generated', |
| 26 | + platformname='gend', buildname='8.fake', status='p') |
| 27 | + ``` |
| 28 | + """ |
0 commit comments