Tests did not detect serious bug
mo2561057 opened this issue · 3 comments
mo2561057 commented
Lines 450 to 463 in 13e5720
I accidentally pulled a container into a loop in the referenced function while working on the afqt branch .
That led to a situation were only the last observable was included in the state space.
The simulation of a model with observables did not work anymore for period > 4.
The tests did however not detect that since these use <= 4 periods.
Either something is wrong with the creation of the index under observables or one at least one test should check a random model with more periods.
janosg commented
I think we could improve regression tests in general. I have the following suggestions:
- Evaluate several parameter vectors for each criterion function. This way we can save setup costs which are currently probably the main cost of regression tests with more periods
- Save some intermediate values. At least the dataset, but possibly more. We should also have asserts on those intermediate steps. This makes debugging much easier.
- Start to write regression tests for individual components. For example, there should be regression tests just for the state space creation. When testing such small components it's easier to reason about edge cases and reach a large coverage with few well designed cases.
tobiasraabe commented
Moved discussion. Original issue solved.