Search code examples
seleniumautomationcucumbergherkin

Can you use external resources in Cucumber feature "Examples:" section?


Here is my test feature file with one scenario

Feature: My test feature

Scenario Outline: I want user to be logged into MyPage

When user goes to MyPage
And user fills "<test_login>" login field
And user fills "<test_password>" password field
And user clicks Login button
Then user should be logged in

Examples:
|test_login|test_password|
|login1234|password1234|

I would like to modify my Examples: section to something like this

Examples:
src/test/resources/datatables/logind_data.table

I want to use a path to file that contains data table but I get Cucumber gherkins builder error message. error_modal

Is it possible to use external resources in "Examples:"?


Solution

  • This is currently not possible. We're discussing how to implement is in this issue. Feel free to join the conversation over there.