Motivation
The command features backing the interactive menus displayed in ResInsight has no unit test coverage. Some of these features require a live user interface to be tested. Add infrastructure to be able to add tests for features.
Description
Adds a new ResInsight-featuretests GoogleTest executable that boots a headless (offscreen) RiaGuiApplication and exercises Ric*Feature commands through the same code path used by the GUI (QAction triggers), rather than calling command classes directly.
Contents:
- Test infrastructure:
RiaFeatureTestModelBuilder builds an in-memory project model covering Eclipse, GeoMech, well path, summary, and polygon domains; RiaFeatureTestTreeView is a headless tree-view/selection helper; RicFeatureExecutionRunner triggers a feature through its registered QAction.
- Enablement sweep: parameterized test calling
isCommandEnabled() for every registered feature with an empty selection, isolating any crash to the offending feature id.
- Execution sweep: runs every registered feature against a richer model, with a denylist and (for CI) one child process per feature so a crash/hang is isolated and reported against its own command id. Limited to the nightly schedule due to cost.
- Curated tests: deep tests for 12 individual features (new view, close case, delete well path, toggle items, new intersection, Eclipse property/cell filters, well path lateral, perforation interval, summary plot, well log plot, polygon, cell index filter), grouped under
FeatureTests/Tests.
Found and fixed one real bug via the enablement sweep: a null-pointer dereference in RicPlaceThermalFractureUsingTemplateDataFeature::selectedThermalFracture().
Motivation
The command features backing the interactive menus displayed in ResInsight has no unit test coverage. Some of these features require a live user interface to be tested. Add infrastructure to be able to add tests for features.
Description
Adds a new
ResInsight-featuretestsGoogleTest executable that boots a headless (offscreen)RiaGuiApplicationand exercisesRic*Featurecommands through the same code path used by the GUI (QAction triggers), rather than calling command classes directly.Contents:
RiaFeatureTestModelBuilderbuilds an in-memory project model covering Eclipse, GeoMech, well path, summary, and polygon domains;RiaFeatureTestTreeViewis a headless tree-view/selection helper;RicFeatureExecutionRunnertriggers a feature through its registeredQAction.isCommandEnabled()for every registered feature with an empty selection, isolating any crash to the offending feature id.FeatureTests/Tests.Found and fixed one real bug via the enablement sweep: a null-pointer dereference in
RicPlaceThermalFractureUsingTemplateDataFeature::selectedThermalFracture().