Skip to content

How to indicate that a feature is only valid in combination with specific others #264

@ilyvion

Description

@ilyvion

Suppose we have three features: feature_a, feature_b, and feature_only_if_a_or_b. The third feature, feature_only_if_a_or_b, is meaningful only when at least one of feature_a or feature_b is enabled. Otherwise, it does nothing and shouldn't be tested.

In terms of combinations, I want to test the following setups:

  • feature_a
  • feature_b
  • feature_a + feature_only_if_a_or_b
  • feature_b + feature_only_if_a_or_b
  • feature_a + feature_b + feature_only_if_a_or_b

I understand --group-features can enforce specific groupings, like:

--group-features feature_a,feature_only_if_a_or_b --group-features feature_b,feature_only_if_a_or_b

However, this approach excludes feature_a and feature_b from running without feature_only_if_a_or_b. It doesn't allow single features to run independently.

Likewise, no combination of --exclude-features or --include-features achieves the desired behavior. For example, --exclude-features feature_only_if_a_or_b prevents it from running solo but also removes it from any valid combination.

When a feature is a strict sub-feature of another, there's an easy fix, you just make the sub-feature enable the parent feature. This is, however, not possible when a feature is orthogonally integrated with others, like in this case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions