flowbber.plugins.sources.gtest

Google Test

This source parses the JUnit like results XML file generated by Google Test.

Data collected:

{
    "failures": 1,
    "disabled": 1,
    "errors": 1,
    "tests": 1,
    "time": 10.555,
    "timestamp": "2017-09-13T00:51:51",
    "properties": {
        "<propname1>": "<propvalue1>"
    },
    "suites": {
        "<suitename1>": {
            "cases": {
                "<casename1>": {
                    "status": "<PASS|FAIL|SKIP>",
                    "time": 0.05,
                    "properties": {
                        "<propname1>": "<propvalue1>"
                    }
                },
                "<casename2>": {
                    "status": "<PASS|FAIL|SKIP>",
                    "time": 0.05,
                    "properties": {
                        "<propname1>": "<propvalue1>"
                    }
                }
            },
            "properties": {
                "<propname1>": "<propvalue1>"
            },
            "failures": 1,
            "passed": 1,
            "disabled": 1,
            "errors": 1,
            "tests": 1,
            "time": 0.456
        }
    }
}

In addition to the previous data structure, if status is FAIL an additional key failures will be available with a list of failures found:

{
    # ...
    'failures': [
        '/home/kuralabs/googletest-example/tests/test2.cpp:12\n'
        'Expected: 0\n'
        'To be equal to: 1',
    ]
}

Dependencies:

pip3 install flowbber[gtest]

Usage:

[[sources]]
type = "gtest"
id = "..."

    [sources.config]
    xmlpath = "tests.xml"
{
    "sources": [
        {
            "type": "gtest",
            "id": "...",
            "config": {
                "xmlpath": "tests.xml"
            }
        }
    ]
}

xmlpath

Path to the JUnit like XML results tests.xml file to be parsed.

  • Default: N/A

  • Optional: False

  • Schema:

    {
        'type': 'string',
        'empty': False,
    }
    
  • Secret: False

Classes

class flowbber.plugins.sources.gtest.GTestSource(index, type_, id_, optional=False, timeout=None, config=None)

Inheritance

Inheritance diagram of GTestSource