Selenium Webdriver Appium Complete TutorialSelenium Webdriver Appium Complete Tutorial
Automation Testing
  • Tools
    • Selenium
      • Selenium Java Tutorial
      • Selenium C# Tutorial
    • Appium
      • Appium Java Tutorial
      • Appium C#Tutorial
    • Katalon
  • Trainings
  • TestNG
  • Reports
    • Extent Reports
      • Extent Reports – Java
      • Extent Reports – Java -Version3
      • Extent Reports – C#
    • Vigo Reports
    • AT Excel Report
  • Excel
    • Apache POI – Java
    • Excel With C#
  • Interview Questions
    • Selenium Interview Questions
    • Java Interview Questions
    • C# Interview Questions
  • Demo Site
  • Practice Site
  • More…
    • AutoIt
    • Sikuli
    • Robot Class
    • File Upload
    • ScreenShot
      • AShot
      • ShutterBug
  • About
December 13, 2016

Running testng.xml using Eclipse





In our previous blog we have learnt how to run testng.xml using command prompt. Now, in this blog will learn running testng.xml using eclipse IDE. This is one of the ways to execute the automation scripts using testng.xml configuration file.

Below are the steps to running testng.xml using Eclipse:

1.  Open Eclipse.
2.  Go to the Project where we have created the testng.xml file.
3.  Right click on the testng.xml file, then you can see the below screen

Run as testng suite

4.  Then Select the options : Run As → TestNG Suite
5.  Then it will execute the scripts as TestNG Suite.
6.  After executing the testng.xml file, it will give the below report.

testng result from eclipse

This is the simplest way to execute the scripts using eclipse. Before running the suite, we can open the testng.xml file and can do the modifications or configurations as per the need and can execute the scripts from the eclipse. Then it will give you the report next to console section as a separate tab called “Results of running suite”. Here we can see the status of the executed tests and can see statistics like how many tests got passes. failed and skipped.

Compare to running the command prompt it is the easiest way to execute the scripts. But both the ways have their own advantages. It purely depends on the requirement how we want to execute the scripts.



Share this post: on Twitter on Facebook

Running testng.xml using Command Prompt Creating testng.xml file with multiple tests

Related Posts

Excel to DataProvider

TestNG

Read data from Excel to DataProvider in Selenium

Running TestNG programmatically

TestNG

Running TestNG Tests Programmatically

EXECUTING ONLY FAILED TESTS

TestNG

Executing Only Failed Tests in TestNG

Capture Screenshot for Failed Tests

TestNG

Capture Screenshot for Failed Tests in TestNG

Preserve Order in TestNG

TestNG

Preserve Order in TestNG

PRIORITIZING TESTS

TestNG

Prioritizing Tests in TestNg

EXECUTE MULTIPLE XML FILES

TestNG

Execute Multiple XML files in TestNG

CUSTOM REPORTER IN TESTNG (1)

TestNG

Custom Reporter in TestNG

CUSTOM LOGGER IN TESTNG

TestNG

Custom Logger in TestNG

ASSERTIONS

TestNG

TestNG Assertions

Newsletter

Recent Posts

  • TAKING WEB ELEMENT SCREENSHOT IN SELENIUMHow to Capture WebElement Screenshot in Selenium Webdriver using selenium 4
    December 15, 2019
  • How To SWAP Two Numbers in Java Without using Temp VariableHow to SWAP Two Numbers in Java Without Temp variable or Without Third variable
    December 8, 2019
  • How to Swap Two Numbers in Java with Temp VariableHow to SWAP Two Numbers in Java using Temp Variable
    December 1, 2019
  • How to Read Properties file in JavaHow to Read Data From Properties File in Java
    November 27, 2019
  • Compare two arrays in java with out inbuilt functionsHow to Compare Two Arrays in Java without built-in functions
    November 16, 2019
© Selenium Webdriver Appium Complete Tutorial 2025