lisa.tests.base.AggregatedResultBundle#
- class lisa.tests.base.AggregatedResultBundle(result_bundles, name_metric=None, result=None, context=None)[source]#
Bases:
ResultBundleBaseAggregates many
ResultBundleinto one.- Parameters:
result_bundles (list(ResultBundle)) – List of
ResultBundleto 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_bundleslist will be used.result (Result) – Optionally, force the
self.resultattribute 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
ResultBundleinstances 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_datetimeamong the aggregated bundles.Methods
__bool__()inheritedTrueif theresultisResult.PASSED,Falseotherwise.add_metric()inheritedLets you append several test
TestMetricto the bundle.display_and_exit()inheritedpretty_format()inherited
Properties#
Methods#
- AggregatedResultBundle.__bool__()#
Inherited method, see
lisa.tests.base.ResultBundleBase.__bool__()Trueif theresultisResult.PASSED,Falseotherwise.
- AggregatedResultBundle.add_metric(name, data, units=None)#
Inherited method, see
lisa.tests.base.ResultBundleBase.add_metric()Lets you append several test
TestMetricto 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()