I have developed a keyword driven framework using Selenium WebDriver and Java.Basically I have developed a master TC sheet where it reads the TCs with run mode as yes and go to the test steps sheet and reads the keywords and based on those keywords it does the actions.
I am using a driver script to read these test cases.
Now I would like to run these test cases parallelly using selenium grid. There were two posts I found on stackoverflow about this.
But in this post it's not mentioned how this can be achieved.
Here a solution was proposed but the report is generating as one test case passed or failed.
I have added the @Test annotation for the method in my driverscript which reads the above test cases.
public class DriverScript {
@Test
public void startExecution() throws Exception{
//public static void main(String[] args) throws Exception {
excelUtilities eu = new excelUtilities();
Properties gldata = new Properties();
InputStream input = new FileInputStream("src/executionEngine/config.properties");
gldata.load(input);
List<List<String>> testcases = new ArrayList<List<String>>();
testcases = eu.getTestCases(gldata.getProperty("WB_PATH_TESTS"), gldata.getProperty("WB_PATH_TESTS_SHEET"));
//System.out.println(testcases);
DriverScript.prepareKeywords(testcases);
}
The above method reads the test cases one by one and get the keywords from the individual test cases and based on those keywords. But since I am using @Test method for the method that reads the main test cases it is thinking that it's one test case so the report is generating as 1 test case passed even though we have two test cases above.
===============================================
Suite
Total tests run: 1, Failures: 0, Skips: 0
===============================================
So how to run the test cases parallelly when we have keyword driven framework?
The only solution I am thinking is, the way it was mentioned in the question part of the 2nd post like creating separate methods for each test case and read the test case steps.
Is there any alternative for this on how to run a keyword driven framework on selenium grid?
Thank you.
