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

Not able to execute serenity cucumber test with a set of dynamic test data #3508

Open
jacob25paul opened this issue Aug 1, 2024 · 2 comments

Comments

@jacob25paul
Copy link

What happened?

we are getting test data as a list (list of account numbers) from an external source and would like to execute the same test with all the account numbers in the list in my cucumber test.I have method to get test data as list in @before in Hooks and I am able to execute the test with first account number only. I want to execute the same test against all the account numbers in the list.

What did you expect to happen?

Single test should execute againist all the account numbers in the list

Example:
Dynamic test data: [123,154,187]
Test Case
Given account number is available
When I perform some action on account number
Then I verify account number

Serenity BDD version

3.7.1

JDK version

17

Execution environment

Windows 10

How to reproduce the bug.

  1. Create cucumber Hooks class and add the method to generate the data as list
  2. Add another @after tag to increment the counter to read the next set of data after each execution
  3. Write any test to use data from the list
    Actual Result: test gets executed for the first item in the list
    Expected: Test should execute against each data

How can we make it happen?

Add it to the Serenity BDD backlog and wait for a volunteer to pick it up

@jacob25paul
Copy link
Author

@wakaleo could you please help me on this?

@wakaleo
Copy link
Member

wakaleo commented Aug 19, 2024

Cucumber isn't designed to work this way. If you would like some advise on how to achieve this sort of thing using standard practices, we could do that as part of a commercial support contract.

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

2 participants