I have the below scenario outline to read the file based on the environment.
Scenario Outline:
Given
When
Then
Examples:
| read (‘testdata-SIT‘.csv) |
I want to parameterize the ‘testdata-<env>’.csv based on the environment in which the test is running
I tried the below by passing the env variable from config.js file.
-
| read (‘testdata’+env+’.csv’) | – didnt work
-
*def filename = ‘testdata’+env+’.csv’
<code> | read(filename) | - didnt work</code><code> | read(filename) | - didnt work </code>| read(filename) | - didnt work
In the above 2 cases, file was not replaced properly so file not found error.
Please suggest the right way of doing. Thanks!