SUBSCRIBE HERE TO GET POST UPDATES VIA EMAIL :

Delivered by FeedBurner

WebDriver Data Driven Framework - Implementing Sample Data Reading Test In Both Suites

STEP 9
Prerequisite : 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.
  1. Download SuiteOneCaseTwo.java File
  2. Download SuiteTwoBase.java File
  3. Download SuiteTwoCaseOne.java File
  4. 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.)
  1. Paste SuiteOneCaseTwo.java File on com.stta.SuiteOne Package.
  2. Paste SuiteTwoBase.java File on com.stta.SuiteTwo Package.
  3. Paste SuiteTwoCaseOne.java File on com.stta.SuiteTwo Package.
  4. 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.

Running Test
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.

4 comments:

  1. In Eclipse getting an error like "The hierarchy of the type SuiteOneCaseTwo is inconsistent"

    public class SuiteOneCaseTwo extends SuiteOneBase{

    ReplyDelete
  2. When i m tryng to run .. it gives error "Cannot find class in classpath: com.stta.SuiteTwo.SuiteTwoCaseTwo". kindly help me

    ReplyDelete