Forum Discussion

dev-blinq's avatar
dev-blinq
Frequent Visitor
2 years ago

cucumber js test data

Hi,
I have created a framework that utilize the faker js framework to generate test data and share it across the feature file.

Following is a simple example:

        Scenario Outline: Create a new repository
        # The repository should be private
        Given Create a new repository name "<repo>", description "<description>", and README file
        When Navigate to the home page
        Then Verify the repository name "<repo>" can be found under Top Repositories
        Examples:
            | repo               | description      |
            | {string.alpha(10)} | {loren.text}     |

Due to the fake js framework there are unlimited options (in this example I'm using string.alpha(10) and loren.text).

Currently it generate a new feature file with the fake values and I execute the new feature file.
I'm looking for a better way to replace the value by changing the feature file document before it's getting executed.
Can you guide me on how it can be done?
Thanks

 
No RepliesBe the first to reply