Datadriven Framework For Selenium WebDriver : Implement Test Data Skip Function

STEP 14
Prerequisite : STEP 1 to STEP 13 of creating information driven framework for selenium webdriver software testing tool should live on Implemented.

If y'all know, nosotros demand really custom information driven framework for selenium webdriver where y'all tin skip specific software exam suite, specific exam representative or specific information ready business also from your software exam execution whenever required.

Till Now, We convey Implemented software exam suite together with exam representative skip facility In information driven framework of selenium webdriver. Now this Is the fourth dimension to Implement skipping specific exam information ready business facility In our selenium webdriver automation framework.

Why Need Test Data Skip Function?
Supposing y'all are testing a software spider web application log inward shape to banking venture agree validations on shape fields using dissimilar ten information ready combinations. Now at specific point, You wants to exam shape using exclusively five master copy information ready combinations. In such condition, Your framework should convey a facility to skip selected exam information ready lines.

How To Skip Test Suites From Execution
Here nosotros volition role "checkToRunUtilityOfData" component subdivision of SuiteUtility shape In @BeforeTest method to think "DataToRun" flags of all information ready lines from software exam representative information sheets. And together with thus Inside @Test method, If constitute "DataToRun" = "Y" for specific information ready business together with thus remaining exam volition live on executed using that specific information set. And If "DataToRun" = "N" or blank for specific information ready business together with thus remaining exam volition be skipped using testng SkipException and together with thus It volition banking venture agree "DataToRun" flag for side yesteryear side information set.

Skip Test Data Set From Execution
Step i :
For skipping exam information set, First of all ready "SuiteToRun" = "Y" for both exam suites together with "CaseToRun" = "Y" for all 4 exam cases together with salve all iii excel files of information driven framework every bit shown In bellow Image.


Step two : 
Set "DataToRun" every bit shown In bellow Image In all 4 exam cases files. Then salve together with unopen all excel files.

Step 3 :
Noy y'all needs to alter your all 4 software exam representative files to Implement logic of skip information set. I convey modified all 4 exam representative files. You tin download them yesteryear clicking on bellow given link.
Extract the downloaded folder together with yesteryear all 4 exam cases files every bit described bellow.
(Note : It should supercede existing file when glue It on package. It should non Insert novel file.)

  • Paste SuiteOneCaseOne.java File on com.stta.SuiteOne Package.
  • Paste SuiteOneCaseTwo.java File on com.stta.SuiteOne Package.
  • Paste SuiteTwoCaseOne.java File on com.stta.SuiteTwo Package.
  • Paste SuiteTwoCaseTwo.java File on com.stta.SuiteTwo Package.
Running Test
Note : Before running exam suite, Please brand certain that your all .xls files are closed. If whatever file Is opened upwardly together with thus y'all volition larn an fault during exam suite execution.

Now nosotros are all ready to run our selenium automation framework projection "WDDF" to verify results. Run your exam from testng.xml file.

Whne execution larn completed, Look at your testng results. It volition looks similar bellow.


If y'all encounter In to a higher house result, Some exam information lines are executed together with approximately of them are skipped from execution every bit nosotros convey ready "DataToRun" = "N" against those information lines In excel information sheets. You tin ready "N" for other information ready lines together with run your software exam to verify the accuracy.



More interesting articles here :Generation Enggelmundus Internet Marketing Tool here :Zeageat IM http://www.software-testing-tutorials-automation.com/
Post a Comment (0)
Previous Post Next Post