catchorg / catchorg/Catch2

Running SCENARIOs: Omit "SCENARIO" in selection

Open
#645 1 comment 2 reactions 0 assignees View on GitHub
Possible bug Tweak request
Dominant language
C++
Stars
21.5k
Forks
3.5k
Avg merge
3d 16h
Merged PRs (30d)
2

Description

Say I have some `SCENARIO` defined like so:

``` C++
SCENARIO("foo", "[foo][bar][baz]") {
// ...
}
```

I argue that the intuitive interface for selecting to run only the tests for this specific scenario is: `./test_executable foo`.

However, given that the `SCENARIO` binding prepends its descriptor with `Scenario:`, we're required to instead select for the specific scenario like so: `./test_executable "Scenario: foo"`, which seems less than ideal.

Contributor guide

Open the contributing guide

Research direction

The issue concerns SCENARIO descriptor binding and command-line selection through ./test_executable. Start by tracing where the Scenario: prefix is added and how selection arguments are matched. Done means ./test_executable foo selects that scenario without requiring the Scenario: prefix, while existing selection behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.