Prerequisite : Jar files should be added In software testing project's build path As described In Step 4.
(Special Note : Please don't skip any of the previous steps.).
Now Its time to create all required class(.java) files under different packages. In our selenium WebDriver software testing data driven framework, We have to create one base class for all the test suites of project. We have tocreate one base class for each and every test suite. And then, We have to create separate classes for each test case In each test suite. In our data driven framework for software web application, Initially we will create only two test suites having two test cases In each. Later on, You can create more test suites and test cases as per your software web application's requirement. Follow the steps of test cases and test suites class creation.
(Note : All class files names should be same as given bellow. Please consider case sensitivity when giving class file name.)
Create bellow given class file under "com.stta.TestSuiteBase" Package.
- SuiteBase.java - We will use this class file as a master base class file for both the test suites (com.stta.SuiteOne, com.stta.SuiteTwo) for software web application.
This package will be considered as a test suite one and will create test suite one related classes under this package. Create bellow given class files under "com.stta.SuiteOne" Package. Later on, You can create more test case classes under any suite.
- SuiteOneBase.java - This class will be used as base class of test suite one.
- SuiteOneCaseOne.java - This class will be used as test case one of suite one.
- SuiteOneCaseTwo.java - This class will be used as test case two of suite one.
This package will be considered as a test suite two and will create test suite two related classes under this package.Create bellow given class files under "com.stta.SuiteTwo" Package.
- SuiteTwoBase.java - This class will be used as base class of test suite two.
- SuiteTwoCaseOne.java - This class will be used as test case one of suite two.
- SuiteTwoCaseTwo.java - This class will be used as test case two of suite two.
This package will be considered as utility package and framework's utility related classes will be created under this package. At present, create bellow given 2 packages and later on will create more classes If required.
- Read_XLS.java - Functions related to read data from .xls files will be will be created In this class.
- SuiteUtility.java - Utility functions will be created In this class.
Now your packages structure will looks like bellow.
We are going very slow In data driven framework creation and I am trying to cover each and every point from very basic level so that any one can create and understand this framework very easily.