lisa.tests.base.AggregatedResultBundle#
- class lisa.tests.base.AggregatedResultBundle(result_bundles, name_metric=None, result=None, context=None)[source]#
Bases:
ResultBundleBase
Aggregates many
ResultBundle
into one.- Parameters:
result_bundles (list(ResultBundle)) – List of
ResultBundle
to aggregate.name_metric (str) – Metric to use as the “name” of each result bundle. The value of that metric will be used as top-level key in the aggregated metrics. If not provided, the index in the
result_bundles
list will be used.result (Result) – Optionally, force the
self.result
attribute to that value. This is useful when the way of combining the result bundles is not the default one, without having to make a whole new subclass.context (dict(str, object)) – Contextual information to attach to the bundle. Keep the content small, as size of
ResultBundle
instances matters a lot for storing long test sessions results.
This is useful for some tests that are naturally decomposed in subtests.
Note
Metrics of aggregated bundles will always be shown, but can be augmented with new metrics using the usual API.
Properties
Merge the context of all the aggregated bundles, with priority given to last in the list.
Use the earliest
utc_datetime
among the aggregated bundles.Methods
__bool__()
inheritedTrue
if theresult
isResult.PASSED
,False
otherwise.add_metric()
inheritedLets you append several test
TestMetric
to the bundle.display_and_exit()
inheritedpretty_format()
inherited
Properties#
Methods#
- AggregatedResultBundle.__bool__()#
Inherited method, see
lisa.tests.base.ResultBundleBase.__bool__()
True
if theresult
isResult.PASSED
,False
otherwise.
- AggregatedResultBundle.add_metric(name, data, units=None)#
Inherited method, see
lisa.tests.base.ResultBundleBase.add_metric()
Lets you append several test
TestMetric
to the bundle.
- AggregatedResultBundle.display_and_exit() None #
Inherited method, see
lisa.tests.base.ResultBundleBase.display_and_exit()
- AggregatedResultBundle.pretty_format(multiline=True)#
Inherited method, see
lisa.tests.base.ResultBundleBase.pretty_format()