How to run two tests in selenium with diff data using data provider | Selenium Forum
P
panienator Posted on 10/07/2020

Here is the steps,

in same class file below 2 tests are present

1. @Test

//This will have login details

public void login(){

code here to login

}

2. @Test

//This will have booking details

public void createbooking(){

 

}

 

now i have two data providers one for login and another for create booking with two sets of data like,

 

username and password( two sets) - Object[][] ar = new Object[2][2];  - for login Test

 

bookingname, booking type and bookingcontainer( two sets) - Object[][] ar = new Object[2][3]; - for create booking Test

 

Now i want to run for two sets of data one after another in same class - How to do this

 

Please help

 

 


A
Ashish Thakur Replied on 11/07/2020

Have you seen data driven or hybrid framework?

Thats what i have told there


P
panienator Replied on 12/07/2020

Thanks will look into it

 

Also, one suggestion

 

Can you please add search option in this query resolution page so that by using search we can search for other people questions who have posted. This way it will help if our question and already posted question by someone is there we can just use that without having to ask question again


A
Ashish Thakur Replied on 15/07/2020

Sure we will put the search option.

I saw your issue closely now. Its not possible to do the way you are expecting using data provider


P
panienator Replied on 15/07/2020

So, please help how can we achieve the above scenario.

 

Sure we will put the search option. - Thanks


A
Ashish Thakur Replied on 30/07/2020

Please refer to Hybrid Framework or Data-Driven Framework. We have covered in detail how you can run different test cases with different sets of data.


P
panienator Replied on 03/08/2020

Yeah Sure Will Check that

 

Thanks!


Related Posts