コード例 #1
0
ファイル: test_api.py プロジェクト: fukaij/testplan
def example_report():
    return report.TestReport(
        name="Interactive API Test",
        uid="Interactive API Test",
        entries=[
            report.TestGroupReport(
                name="MTest1",
                uid="MTest1",
                category="multitest",
                entries=[
                    report.TestGroupReport(
                        name="Suite1",
                        uid="MT1Suite1",
                        category="suite",
                        entries=[
                            report.TestCaseReport(
                                name="TestCase1", uid="MT1S1TC1"
                            )
                        ],
                    )
                ],
            )
        ],
    )
コード例 #2
0
EXPECTED_REPORT_SKELETON = report.TestGroupReport(
    name="MTest",
    category=report.ReportCategories.MULTITEST,
    uid="MTest",
    env_status=entity.ResourceStatus.STOPPED,
    entries=[
        report.TestGroupReport(
            name="Suite",
            description="Basic testsuite.",
            category=report.ReportCategories.TESTSUITE,
            uid="Suite",
            parent_uids=["MTest"],
            entries=[
                report.TestCaseReport(
                    name="case",
                    description="Basic testcase.",
                    uid="case",
                    parent_uids=["MTest", "Suite"],
                ),
                report.TestGroupReport(
                    name="parametrized",
                    description="Parametrized testcase.",
                    category=report.ReportCategories.PARAMETRIZATION,
                    uid="parametrized",
                    parent_uids=["MTest", "Suite"],
                    entries=[
                        report.TestCaseReport(
                            name="parametrized__val_1",
                            description="Parametrized testcase.",
                            uid="parametrized__val_1",
                            parent_uids=["MTest", "Suite", "parametrized"],
                        ),
コード例 #3
0
ファイル: test_api.py プロジェクト: naidu-kjml/testplan
def example_report():
    """Create a new report skeleton."""
    return report.TestReport(
        name="Interactive API Test",
        uid="Interactive API Test",
        entries=[
            report.TestGroupReport(
                name="MTest1",
                uid="MTest1",
                category=report.ReportCategories.MULTITEST,
                env_status=entity.ResourceStatus.STOPPED,
                parent_uids=["Interactive API Test"],
                entries=[
                    report.TestGroupReport(
                        name="Suite1",
                        uid="MT1Suite1",
                        category=report.ReportCategories.TESTSUITE,
                        parent_uids=["Interactive API Test", "MTest1"],
                        entries=[
                            report.TestCaseReport(
                                name="TestCase1",
                                uid="MT1S1TC1",
                                parent_uids=[
                                    "Interactive API Test",
                                    "MTest1",
                                    "MT1Suite1",
                                ],
                            ),
                            report.TestGroupReport(
                                name="ParametrizedTestCase",
                                uid="MT1S1TC2",
                                category=(
                                    report.ReportCategories.PARAMETRIZATION),
                                parent_uids=[
                                    "Interactive API Test",
                                    "MTest1",
                                    "MT1Suite1",
                                ],
                                entries=[
                                    report.TestCaseReport(
                                        name="ParametrizedTestCase_0",
                                        uid="MT1S1TC2_0",
                                        parent_uids=[
                                            "Interactive API Test",
                                            "MTest1",
                                            "MT1Suite1",
                                            "MT1S1TC2",
                                        ],
                                    ),
                                    report.TestCaseReport(
                                        name="ParametrizedTestCase_1",
                                        uid="MT1S1TC2_1",
                                        parent_uids=[
                                            "Interactive API Test",
                                            "MTest1",
                                            "MT1Suite1",
                                            "MT1S1TC2",
                                        ],
                                    ),
                                    report.TestCaseReport(
                                        name="ParametrizedTestCase_2",
                                        uid="MT1S1TC2_2",
                                        parent_uids=[
                                            "Interactive API Test",
                                            "MTest1",
                                            "MT1Suite1",
                                            "MT1S1TC2",
                                        ],
                                    ),
                                ],
                            ),
                        ],
                    )
                ],
            )
        ],
    )