Selenium WebDriver Framework - Implementing Suite Skip Function

STEP 11
Prerequisite : All previous selenium framework creation steps starting from STEP 1 to STEP 10 should hold out Implemented.

Right straight off nosotros are at the middle of selenium Webdriver software automation framework creation process. Now adjacent stride Is to Implement software automation exam suite skipping functionality In selenium information driven automation framework.

Why Need Test Suite Skip Function?
Supposing you lot are testing software spider web application together with you lot convey created ten unlike software exam automation suites for your application. But at whatever specific stage, You wants to execute solely 3 software exam suites from ten exam suites. In this condition, Your selenium automation framework should convey a facility to run solely selected 3 exam cases. Remaining seven software exam automation suites should skiped from execution.

How To Skip Test Suites From Execution
For skipping exam suites from execution, We convey to add together unopen to code In both software automation exam suite's base of operations files together with nosotros convey to laid upwards "SuiteToRun" = "N" (against the exam suite you lot wants to skip) In TestSuiteList.xls file. So code of SuiteOneBase.java and SuiteTwoBase.java files volition banking concern gibe the "SuiteToRun" flag for that specific exam illustration In "SuitesList" canvass of TestSuiteList.xls file.

Skip "SuiteOne" Suite From Execution
So let's consider, You wants to skip "SuiteOne" from execution together with you lot wants to execute solely "SuiteTwo" suite In our automation framework. For that you lot needs to set "SuiteToRun" = "N" for "SuiteOne" In  "SuitesList" canvass of  TestSuiteList.xls file equally bellow.



I convey updated  SuiteOneBase.java and SuiteTwoBase.java files and too updated TestSuiteList.xls file accordingly to skip "SuiteOne" from execution. You tin download all 3 file's nil folder yesteryear clicking on bellow given link.


Extract the nil folder afterward downloading It. You volition teach bellow given 3 files from It. Replace them amongst existing files of "WDDF" projection In Eclipse equally described bellow.
(Note : It should supersede existing file when glue It on package. It should non Insert novel file.)

  • Paste TestSuiteList.xls File on com.stta.ExcelFiles Package.
  • Paste SuiteOneBase.java File on com.stta.SuiteOne Package.
  • Paste SuiteTwoBase.java File on com.stta.SuiteTwo Package.
Now run your testng.xml file yesteryear correct clicking on It equally described In previous ship service together with verify testng consequence together with console result.

Testng consequence volition looks similar bellow

So nosotros achieved our destination of skipping "SuiteOne" from execution. Now supposing you lot wants to skip "SuiteTwo" from execution. To create that, You only involve to set  "SuiteToRun" = "Y" for "SuiteOne" and "SuiteToRun" = "N" for "SuiteTwo" In  "SuitesList" canvass of  TestSuiteList.xls file. It volition execute only "SuiteOne" together with skip "SuiteTwo" execution.

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