lisa.regression.RegressionResult#
- class lisa.regression.RegressionResult(testcase_id, old_count, new_count, alpha=None)[source]#
Bases:
object
Compute failure-rate regression between old and new series.
The regression is checked using Fisher’s exact test.
- Parameters:
testcase_id (str) – ID of the testcase, used for pretty-printing
old_count (ResultCount) – number of times the test passed and failed in the old series
new_count (ResultCount) – number of times the test passed and failed in the new series
alpha (float) – Alpha risk when carrying the statistical test
Properties
Delta between old and new failure rate in percent.
Tuple of failure rate in percent for old an new series.
Number of iterations required to validate a fix that would “revert” a regression.
P-value of the statistical test.
Tuple of sample sizes for old and new series.
True if there is a significant difference in failure rate, False otherwise.
Methods
Build a
RegressionResult
from two list oflisa.tests.base.Result
, or objects that can be converted to bool.Compute the p-value of the statistical test, with the given alternative hypothesis.
Properties#
- property RegressionResult.failure_delta_pc[source]#
Delta between old and new failure rate in percent.
- property RegressionResult.failure_pc[source]#
Tuple of failure rate in percent for old an new series.
- property RegressionResult.fix_validation_min_iter_nr[source]#
Number of iterations required to validate a fix that would “revert” a regression.
Assuming that the “fixed” failure rate is exactly equal to the “old” one, this gives the number of iterations after which comparing the “fixed” failure rate with the “new” failure rate will give a statistically significant result.
Methods#
- classmethod RegressionResult.from_result_list(testcase_id, old_list, new_list, alpha=None)[source]#
Build a
RegressionResult
from two list oflisa.tests.base.Result
, or objects that can be converted to bool.Note
Only
FAILED
andPASSED
results are taken into account, other results are ignored.- Parameters:
testcase_id (str) – ID of the testcase
old_list (list(lisa.tests.base.Result)) – old series
new_list (list(lisa.tests.base.Result)) – new series
alpha (float) – Alpha risk of the statistical test