I am new to Karate UI and I was exploring different options of iterating with a different set of data (Data-driven testing ). I found on the site an example of Kittens which is been used to call tables from other feature files.
I have a use case in UI
Login to the application (One feature file)
Input username input password input email id
(Data-driven using CSV file to loop with a different set of data ) ( Separate feature file ) using Scenario Outline with examples
DO some clicks and submit an order (Third feature file )
So the execution happens likes this
Login to the application (One feature file)
Input username (Multiple times depending on the CSV data) input password input email id
And then the rest of the order submission
So mY question here is that Can we call the data table of (username, password, etc ) in the third feature file? Like the examples of kittens using a
- table Kittens?
and the end goal is to execute the whole thirst scenario for 1 set of data and then iterate the whole scenario for 2 sets of data.
I tried different ways to call the second feature file (Shown in kittens example ) but is not working like that
Third feature file
Background:
table kittens
| firstName | lastName | emailId | phoneNumber |
| 'test001' | 'Nov-7' | 'test@001.com' | 'xxxx' |
' call read('classpath:xxxx.feature') kittens'
xxxx.feature
And waitFor(locators).input('<firstName>')
And waitFor(locators).input()
And waitFor(locators).input()
And waitFor(locators).input('<phoneNumber>')
And waitFor(locators).input('<zipCode>')
I tried this too * def query = { name: <firstName>, country: <lastName>, active: <active>, limit: <limit> }
And waitFor(locators).input(query)
| name | country | active | limit |
| 'test001' | 'Nov-7' | 'xxxx' | 'xcxcx' |