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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent parallel execution of examples #340

Open
erichstuder opened this issue Jun 30, 2024 · 0 comments
Open

Prevent parallel execution of examples #340

erichstuder opened this issue Jun 30, 2024 · 0 comments

Comments

@erichstuder
Copy link

I have a feature file like this:

# language: en

Feature: Persistency

    Scenario Outline: Persisted Parameters
        Given the communication to the device over RS232
        When the command is sent: 'store <parameter_name> <value_example>\n'
        And the command is sent: 'read <parameter_name>\n'
        Then the answer is: '<value_example>\n'

        Examples:
        | parameter            | parameter_name       | value_example   |
        | Wi-Fi SSID           | wifi_ssid            | this_is_an_ssid |
        | Wi-Fi Password       | wifi_password        | wifi_password   |

I found out that the different examples run in parallel.
So step one runs twice, then step two runs twice, ...
As I have a shared resource (UART) this causes strange behavior.

I would expect that for every example all steps are executed and then the next example is executed.
Interestingly in cucumber-cpp I never had this problem.
(Note: If I have only one example, everything works fine.)

Questions:

  • Is it a misunderstanding from my side and this should not happen at all?
  • Is there an option to force sequential execution?
  • Should I take sync measures to prevent this behavior in the step implementation? What would you suggest?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant