Skip to content

Add command-feature (Ric*Feature) test coverage #14741

Description

@magnesj

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().

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

PendingReleaseIssues is fixed and will be available in next releaseSystemRefactoring or build/test system issues. Code improvments not directly affecting the user.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions