DataDriven Framework For WebDriver Step ten - Adding testng.xml To Run Multiple Test Cases

STEP 10
Prerequisite
1. All the previous steps starting from STEP 1 to STEP 9 should survive Implemented properly.
2. TestNG software unit of measurement testing framework should survive Installed properly In eclipse. VIEW TESTNG INSTALLATION GUIDE.

Now our all 4 exam cases from both the suites are able to read information from related excel file every bit described In STEP ix of information driven framework creation. But correct right away master copy Issue Is nosotros ask to run all 4 exam cases
one past times i to execute all of them. Now nosotros ask something past times which nosotros tin executed all the exam cases from i place. As I convey described earlier, We convey to purpose TestNG In our information driven framework. So nosotros tin purpose testng.xml file In our software automation testing framework which volition permit us to execute all the exam cases from i place.

You tin READ MORE TUTORIALS ON TESTNG FRAMEWORK for your reference.

Adding .xml files for both suites
First of all, We volition produce split upward .xml files for both the exam suites of software spider web application in addition to and hence nosotros volition telephone hollo upward both the .xml files In testng.xml file. I convey created .xml files for both the exam suites in addition to yous tin download them past times clicking on bellow given download links.

  1. SuiteOne.xml
  2. SuiteTwo.xml
Right right away nosotros convey alone 2 exam suites hence nosotros convey created alone .xml files. If yous convey to a greater extent than exam suites for your software spider web application in addition to hence yous ask to produce to a greater extent than .xml files In same way.

Copy both downloaded files in addition to glue them on information driven projection "WDDF" In eclipse.

Adding testng.xml file
Now yous convey to produce testng.xml file. I convey already created It for you. Click on bellow given download link to download It.
  1. testng.xml
Right right away nosotros convey alone 2 exam suites for software spider web application hence listed alone 2 exam suites In this testng.xml file. If yous convey to a greater extent than exam suites for software spider web application and created to a greater extent than .xml files for each suite in addition to hence likewise yous ask to add together them In testng.xml file.

Copy higher upward downloaded file in addition to glue It on information driven projection "WDDF" In eclipse.
Now your information driven projection "WDDF" volition looks similar bellow In eclipse.

Running all Test cases from i house (testng.xml)
Now yous are produce to run all 4 exam cases of software spider web application from i place. For running both the exam suites of information driven framework In eclipse Right click on testng.xml file in addition to pick out "Run As" -> "Test TestNG Suite". It volition run all 4 exam cases from both the exam suites in addition to results volition survive displayed every bit bellow In testng results tab of eclipse at the halt of execution.



Now onward, nosotros volition run exam suites from testng.xml file to run both exam suites.

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