Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to specify an arbitrary file in a non-default scenario #1124

Merged
merged 1 commit into from
Apr 27, 2023

Conversation

cbeauchesne
Copy link
Collaborator

@cbeauchesne cbeauchesne commented Apr 27, 2023

Description

We have actually two ways to execute a test:

./run.sh SCENARIO_NAME   # SCENARIO_NAME is played, and all relevant tests are executed. `SCENARIO_NAME` 
                         # can be ommitted, the default scenario will be executed
./run.sh path/to/a/file  # DEFAULT scenario is played, and every tests inside `path/to/a/file` are executed,
                         # if they belong to the default scenario.

馃拃 There is no way to execute an arbitrary test if it does not belong the the default scenario.

With this change, it's now possible, by running this :

./run.sh SCENARIO_NAME path/to/a/file

Wait, but why ...

This is not possible:

./run.sh path/to/a/file

And you play the scenario that belong to path/to/a/file ?

For two reasons :

  1. the bad one : as now, how system tests works, scenario mechanism must be configured before any test collection. So we can't do it without a pretty big revamp
  2. the good one : but what happen if there is more than one scenario in path/to/a/file? running more than one scenario in a pytest process would require a huge revamp.

So for now, let's move forward with this small cost.

@cbeauchesne cbeauchesne marked this pull request as ready for review April 27, 2023 15:15
@cbeauchesne cbeauchesne requested a review from a team as a code owner April 27, 2023 15:15
@cbeauchesne cbeauchesne merged commit ca670dc into main Apr 27, 2023
184 of 189 checks passed
@cbeauchesne cbeauchesne deleted the cbeauchesne/run-cli branch April 27, 2023 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev-x Improve developer experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant