Test Suite -Login all test then login all test | Selenium Forum
M
Posted on 06/02/2017
Hi,
I need help on below case.

I'm Implementing POM frame work I want to do below scenarios. Can you please help me how can I achieve it.

Login with first user and run all 30 test cases ,then login with second user and run all 30 test cases and so on.

Can you please let me know how can we implement this?
your help much appreciated.

Thanks,
C

M
Replied on 06/02/2017

your test cases should not be dependent on other test cases. so do it like this

@BeforeTEST(){//it only run once for all tescases
login code here
}

@test(){
test1 here
}
.
.
@test(){
test30 here
}
@aftertest(){
log out code here
}


M
Replied on 08/02/2017

yes got the point but , I also have to parametrize login test.

Scenario:

I have 10 different user.

Login with user1 and perform all 30 test cases
then login with user2 and then perform all 30 test cases

so I need to parametrize login test also as want to perform all 30 test cases with different user and @Beforetest method not allowing Dataprovide.

Can you please help on this.

Thanks,


M
Replied on 08/02/2017

you can try this q/a

http://stackoverflow.com/questions/33117594/can-dataprovider-pass-data-to-beforetest