Skip to content

robot.model.stats

Stat

Stat(name)

Bases: Sortable

Generic statistic object used for storing all the statistic values.

Source code in src/robot/model/stats.py
def __init__(self, name):
    #: Human readable identifier of the object these statistics
    #: belong to. `All Tests` for
    #: :class:`~robot.model.totalstatistics.TotalStatistics`,
    #: long name of the suite for
    #: :class:`~robot.model.suitestatistics.SuiteStatistics`
    #: or name of the tag for
    #: :class:`~robot.model.tagstatistics.TagStatistics`
    self.name = name
    self.passed = 0
    self.failed = 0
    self.skipped = 0
    self.elapsed = timedelta()
    self._norm_name = normalize(name, ignore='_')

TotalStat

TotalStat(name)

Bases: Stat

Stores statistic values for a test run.

Source code in src/robot/model/stats.py
def __init__(self, name):
    #: Human readable identifier of the object these statistics
    #: belong to. `All Tests` for
    #: :class:`~robot.model.totalstatistics.TotalStatistics`,
    #: long name of the suite for
    #: :class:`~robot.model.suitestatistics.SuiteStatistics`
    #: or name of the tag for
    #: :class:`~robot.model.tagstatistics.TagStatistics`
    self.name = name
    self.passed = 0
    self.failed = 0
    self.skipped = 0
    self.elapsed = timedelta()
    self._norm_name = normalize(name, ignore='_')

SuiteStat

SuiteStat(suite)

Bases: Stat

Stores statistics values for a single suite.

Source code in src/robot/model/stats.py
def __init__(self, suite):
    super().__init__(suite.full_name)
    self.id = suite.id
    self.elapsed = suite.elapsed_time
    self._name = suite.name

TagStat

TagStat(name, doc='', links=None, combined=None)

Bases: Stat

Stores statistic values for a single tag.

Source code in src/robot/model/stats.py
def __init__(self, name, doc='', links=None, combined=None):
    super().__init__(name)
    #: Documentation of tag as a string.
    self.doc = doc
    #: List of tuples in which the first value is the link URL and
    #: the second is the link title. An empty list by default.
    self.links = links or []
    #: Pattern as a string if the tag is combined, ``None`` otherwise.
    self.combined = combined

info property

info

Returns additional information of the tag statistics are about. Either combined or an empty string.