STEP 9Prerequisite : STEP 1 to STEP 8 should be Implemented In data driven framework creation for webdriver software automation tool.
If you have followed all the data driven framework creating steps then I am sure that you will be succeed to read data from SuiteOneCaseOne test data sheet of SuiteOne.xls file for SuiteOneCaseOne test case as described In STEP 8. Now Its time to Implement same data reading test In all remaining 3 software test cases of both the test suites to make sure that everything Is fine till now In data driven framework creation for webdriver software automation tool.
Read more tutorials on selenium WebDriver @Tutorials Part 1 and @Tutorials Part 2.
Download Required Files
To Implement data reading test In remaining test cases for software web application, I have prepared remaining test cases files. You can download them one by one by clicking on bellow given links.
- Download SuiteOneCaseTwo.java File
- Download SuiteTwoBase.java File
- Download SuiteTwoCaseOne.java File
- Download SuiteTwoCaseTwo.java File
Now copy-paste above downloaded files one by one as described bellow to replace existing files.
(Note : It should replace existing file when paste It on package. It should not Insert new file.)
- Paste SuiteOneCaseTwo.java File on com.stta.SuiteOne Package.
- Paste SuiteTwoBase.java File on com.stta.SuiteTwo Package.
- Paste SuiteTwoCaseOne.java File on com.stta.SuiteTwo Package.
- Paste SuiteTwoCaseTwo.java File on com.stta.SuiteTwo Package.
If you look at SuiteTwoCaseOne.java and SuiteTwoCaseTwo.java Files, I have set FilePath's value to "TestCaseListExcelTwo". It Is because, For both these test cases, We have to read data from SuiteTwo.xls File. Also both these test cases will read and print data from only three test data columns because there are available only 3 test data columns In related test case data sheets.
Now you are ready to run all above three test cases os selenium webdriver software testing tool In your eclipse. Run them one by one and verify console and Testng result. Console result should match with targeted sheet data for each test case as bellow.
- SuiteOneCaseTwo.java File's console result should match with SuiteOneCaseTwo sheet of SuiteOne.xls file.
- SuiteTwoCaseOne.java File's console result should match with SuiteTwoCaseOne sheet of SuiteTwo.xls file.
- SuiteTwoCaseTwo.java File's console result should match with SuiteTwoCaseTwo sheet of SuiteTwo.xls file.
If all results math as described above then your test data reading configuration Is fine for both software testing test suites.