hi thread-count must always be equal to number of classes or what. what if we have 2 classes and thread-count = 3 or thread-count = 1 and same thing for test
Nikhil Bhalerao if u set thread count as 1 it will execute one by one instead parallel and if u set TC 3 it will run parallel irrespective of the number ( no< thread count)
hi have the same setup but only difference is i have a data provider for class1 and class2 each have their own data providers that are unique when i tried to run them I'm encountering an error where in it saying data provider mismatch. any ideas on how to resolve it? login.java class: //TCName url username password @DataProvider(name="sampleData") public Object getTestData() { ExcelDataProvider ExclData= new ExcelDataProvider(); String ProjPath = System.getProperty("user.dir"); String excelPath=ProjPath+"/datatable/Login.xlsx"; String excelSheet="TestData"; Object data[][]=ExclData.testData(excelPath, excelSheet); return data; } @Test(dataProvider="sampleData") public void test(String TCName, String url, String username, String password) throws GeneralLeanFtException { ... some test steps.. createaccount.java @DataProvider(name="test1data") public Object getTestData() { ExcelDataProvider ExclData= new ExcelDataProvider(); String ProjPath = System.getProperty("user.dir"); String excelPath=ProjPath+"/datatable/sample1.xlsx"; String excelSheet="TestData"; Object data[][]=ExclData.testData(excelPath, excelSheet); return data; } @Test(dataProvider="test1data") public void test(String TCName, String url, String username, String password, String ID, String email, String firstname, String lastname, String state, String address, String city, String zip, String country, String receiveOffers, String privacyNoticeAgree, String phoneNumber) throws GeneralLeanFtException { CommonPage cmPg = new CommonPage(); CreateAccountPage crtActPg = new CreateAccountPage(); try { .somecoded test steps.... xml
@@KrishnaSakinala I followed this way. but 2 browser instances are not getting launched at once. It's getting launched after one class execution is finished. Pls help
Nice, Thanks for your video. Now, I get more clarification regarding the Parallel execution methods and classes. Thank you so much.
You're very welcome!
Please subscribe to the channel and keep visiting ... :)
how do we make test Data common to all classes ??
hi
thread-count must always be equal to number of classes or what.
what if we have 2 classes and thread-count = 3 or thread-count = 1
and same thing for test
Nikhil Bhalerao if u set thread count as 1 it will execute one by one instead parallel and if u set TC 3 it will run parallel irrespective of the number ( no< thread count)
hi have the same setup but only difference is i have a data provider for class1 and class2 each have their own data providers that are unique when i tried to run them I'm encountering an error where in it saying data provider mismatch. any ideas on how to resolve it?
login.java class:
//TCName url username password
@DataProvider(name="sampleData")
public Object getTestData() {
ExcelDataProvider ExclData= new ExcelDataProvider();
String ProjPath = System.getProperty("user.dir");
String excelPath=ProjPath+"/datatable/Login.xlsx";
String excelSheet="TestData";
Object data[][]=ExclData.testData(excelPath, excelSheet);
return data;
}
@Test(dataProvider="sampleData")
public void test(String TCName,
String url,
String username,
String password) throws GeneralLeanFtException {
... some test steps..
createaccount.java
@DataProvider(name="test1data")
public Object getTestData() {
ExcelDataProvider ExclData= new ExcelDataProvider();
String ProjPath = System.getProperty("user.dir");
String excelPath=ProjPath+"/datatable/sample1.xlsx";
String excelSheet="TestData";
Object data[][]=ExclData.testData(excelPath, excelSheet);
return data;
}
@Test(dataProvider="test1data")
public void test(String TCName,
String url,
String username,
String password,
String ID,
String email,
String firstname,
String lastname,
String state,
String address,
String city,
String zip,
String country,
String receiveOffers,
String privacyNoticeAgree,
String phoneNumber) throws GeneralLeanFtException {
CommonPage cmPg = new CommonPage();
CreateAccountPage crtActPg = new CreateAccountPage();
try {
.somecoded test steps....
xml
Instead of printing something on console...explain with browser launching and doing some operation on browser
I made it very generic. Not only for selenium people. Planned for the people who work in Java development also.
@@KrishnaSakinala I followed this way. but 2 browser instances are not getting launched at once. It's getting launched after one class execution is finished. Pls help
@@shuvendutripathy2912 Depends where ur driver is initialized,if it's in beforeauite then it ll be invoked once