Skip to main content

This generator acts as a helper to create a test.guide compatible test report.

Project description

test.guide Report Generator

Test Releases License

As a modern automotive test engineer, reliance on automated solutions for the execution, reporting and evaluation of my test suites is essential. The complexity of the systems under test, and thus the amount of necessary tests is ever growing tremendously. One of the tools which can help with these tasks is tracetronic test.guide. As a user of test.guide, it is desirable to have a means to customize and structure my test reports in a simple manner.

This generator acts as a helper to create a test.guide compatible test report. Specific Python classes reflecting the different elements of a test report (TestSuite, TestCase and so on) were designed in such a way that you can create your own testsuite from these objects. This facilitates the conversion from arbitrary test report formats into a .json which test.guide can handle. With this generator, it is no more necessary to convert non-ATX formats directly into a .json for test.guide. Instead, the delivered Python classes are prefilled in a simple manner, and the .json is generated for you. On top of this, early format checks are conducted such that you will be notified right away if something is not compliant to the json schema. The currently supported test.guide json schema can be found here.

test.guide

test.guide is a database application for the overview, analysis and follow-up processing of test procedures, which has been specially developed for use in the automotive sector. It significantly facilitates the management of test resources. At the same time, it encourages cross-role cooperation, thereby closing the gap between test execution and test management.

tracetronic test.guide Report Generator project is part of the Automotive DevOps Platform by tracetronic. With the Automotive DevOps Platform, we go from the big picture to the details and unite all phases of vehicle software testing – from planning the test scopes to summarizing the test results. At the same time, continuous monitoring across all test phases always provides an overview of all activities – even with several thousand test executions per day and in different test environments.

Table of Contents

Installation

You can directly install the project from GitHub using pip:

# HTTP
pip install git+https://github.com/tracetronic/testguide_report-generator/

# SSH
pip install git+ssh://git@github.com:tracetronic/testguide_report-generator/

or by adding the testguide-report-generator to your dependency management file, such as requirements.txt or pyproject.toml.

Getting Started

The commands which are necessary to generate test.guide reports are collected exemplarily in the example_TestSuite.py. Run the example script to generate json and zip file:

python example_TestSuite.py

Usage

Assembling a TestSuite Object

The elements follow the hierarchy TestSuite --> TestCaseFolder --> TestCase --> TestStepFolder --> TestStep. So, instances of TestCase(Folder) are added to TestSuite, and instances of TestStep(Folder) are added to TestCase. At least one TestCase or TestStep has to be added to the respective folder (see Restrictions).

In the end, the report generator will take the assembled TestSuite and generate the report. The generator output is a .json report and a .zip file containing the generated test report along with possible testcase artifacts. The .zip file can be uploaded to test.guide via the appropriate option in test.guide. The schema of the .json which test.guide expects can be found here.

A small example may look like this:

# import necessary classes for the TestSuite creation and the .json generator 
from testguide_report_generator import TestSuite, TestCase, Verdict, Generator


def create_testsuite():

    # create the TestSuite object
    testsuite = TestSuite("All Tests", 1666698047000)

    # create the TestCase object
    testcase = TestCase("Test Brakes", 1666698047001, Verdict.FAILED)

    # add the TestCase to the TestSuite
    testsuite.add_testcase(testcase)

    # initialize the generator
    generator = Generator(testsuite)

    # execute the generator and export the result
    generator.export("output.json")

if __name__ == "__main__":
    create_testsuite()

A more extensive example is given in example_TestSuite.py.

Available classes and their purpose

Class Arguments Description
TestStep name of type string, verdict of type Verdict, (expected result of type string) a fundamental teststep, is added to TestCase or TestStepFolder
TestStepArtifact filepath of type string, type of type TestStepArtifactType artifact which gets attached directly to a teststep (such as plots)
TestStepArtifactType the type of a teststep artifact (only used with TestStepArtifact)
TestStepFolder name of type string contains teststeps or teststep folders, is added to TestCase
TestCase name of type string, timestamp of type int, verdict of type Verdict a testcase, may contain teststeps or teststep folders, as well as further specific elements; is added to TestCaseFolder or TestSuite
TestCaseFolder name of type string contains testcases or testcase folders, is added to TestSuite or TestCaseFolder
TestSuite name of type string, timestamp of type int the testsuite, may contain TestCases or TestCaseFolder
Verdict the verdict of the test object
Artifact filepath of type string an optional artifact to an existing filepath, can be added to TestCase
Parameter name of type string, value of type string or int, direction of type Direction a testcase parameter, can be added to TestCase
Direction direction of a Parameter (only used with Parameter)
Constant key of type string, value of type string a test constant, can be added to TestCase
Attribute key of type string, value of type string a test attribute, can be added to TestCase
Review comment of type string, author of type string, timestamp of type int a review may contain further specific elements; is added to TestCase
  • (): arguments in parentheses are optional

Restrictions

Please note that certain requirements for the creation of the test components need to be met in order to generate a valid .json. These include:

A complete specification can be found in the schema.

Contribution

At the moment, no external contributions are intended and merge requests from forks will automatically be rejected! However, we do encourage you to file bugs and request features via the issue tracker.

Documentation

The documentation of the project is formatted as reStructuredText. You can generate documentation pages from this with the help of tools such as Sphinx. All necessary files are located under docs/source. sphinx-apidoc is used to generate the referenced modules'.rst files. Use sphinx-build to generate the documentation in the desired format, e.g. HTML.

Support

If you have any questions, please contact us at support@tracetronic.com and mind our support page.

License

This plugin is licensed under MIT license. More information can be found inside the LICENSE file or within the LICENSES folder. Using the REUSE helper tool, you can run reuse spdx to get a bill of materials.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

testguide_report_generator-1.4.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

testguide_report_generator-1.4-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

Details for the file testguide_report_generator-1.4.tar.gz.

File metadata

  • Download URL: testguide_report_generator-1.4.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for testguide_report_generator-1.4.tar.gz
Algorithm Hash digest
SHA256 100ee260b144b5f7c7d33fe5d922ae0c9f1263edb7c5ffa2d86009b696ffac37
MD5 024222470c11bbcb0a3282bb704c4396
BLAKE2b-256 e6ebaa6dea739b7f7aadd6473f81d14943084a9423da05d19f426a209aaf70a3

See more details on using hashes here.

File details

Details for the file testguide_report_generator-1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for testguide_report_generator-1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 032370df399e11a6fe229ff33df67ceb7ae0cf14f22c1a56c90ee432c9a300c9
MD5 495ed14ec31d7524d36adc3e48a7885e
BLAKE2b-256 cf582c9817edcc8ff809d984f08a7c977658307ef71b5dd47b91a98f563d1c85

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page