Can we call a feature file in a scenario outline? I have a test case where my Create Record scenario outline have some filtered CSV data in it's examples section, but to create record in the page you need to login first. If I call login feature file from Create Record scenario outline.
Login feature file run for multiple data set. Like if Create Record have 2 data set then Login is creating another 2 set of data for the main 2 set of data. So login feature file running for 6 test data.
Is there any better approach to this problem with Karate UI automation?
Below is my feature file structure Create Record feature file:
Scenario Outline: Create record for filtered data from CSV
* call read('commonFeatures/login.feature')
* create record steps
Examples:
| filtered data |
The data will fed to login feature file. Login feature file:
Scenario Outline: Login for filtered data from CSV
* User Login steps
Examples:
| filtered data |
I know there is some flaws with my approach as I am using the same data for both feature file. But I require the same data like user A need to create record then User A need to login First.