0
votes

I have to run a feature file with multiple cases in a single login. For ex:

Scenario: check total When user logs in with "username" and "password" And user checks for "" on "" And user checks for "" on ""

Examples:

| username | password | amount1 | date1 |amount2|date2|... some 20 entries..

I need to check for amount on date in a single login,while in my scenario it is login each time for every entry in data table.How do I achieve it?

Instead I want something like this:
When user logs in with "username" and "password"

Examples:
|username|password| ..use it only once And user checks for "amount" on "date"

Examples:

|amount|date|....loop over 20 times

1
Can you add the complete scenario steps? What you are referring to as 'data table' are actually multiple scenarios. If you want a data table it has to be linked to a specific step in a scenario. - Grasshopper
I mean to say i want to login to app once and test for cases amount and date which are in large nos. - Shadab
currently i am using it like user checks for <amount1> on <date1>,user checks for <amount2> on <date2>,user checks for <amount3> on <date3>.How do i do it using datatable,so that i have to give the date and amount entries and it loops in,without login in twice. - Shadab
Add the complete scenario in your question. If i understand correctly, you have steps to login and then you want to check amount for certain dates. What I do not understand is multiple username and password columns. - Grasshopper
I am talking about something like : stackoverflow.com/questions/21964962/… - Shadab

1 Answers

0
votes

After some research,I have found an answer to this.Just give a datatable after that step,and take datatable as argument in the corresponding java method and iterate over it.