configfailurepolicy in TestNG

TestNG if a configuration failure happens the current behavior is any @Test method execution is skipped.

If you need to execute Tests despite configuration failures, configure configfailurepolicy="continue" at Suite Level.


if following tests are executed as "TestNGTest" @Test methods are skipped

	public void bt() {

	public void tf() {
		System.out.println("My Function");

    Default test
    Tests run: 1, Failures: 0, Skips: 1
    Configuration Failures: 1, Skips: 0

In order to run @Test irrespective of configurationFailures, following setting needs to be configured in testng.xml and all tests needs to be executed as TestNGSuite

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite" parallel="tests" thread-count="10" verbose="10" configfailurepolicy="continue">
      <listener class-name="org.uncommons.reportng.HTMLReporter"/>
      <listener class-name="org.uncommons.reportng.JUnitXMLReporter"/>
      <listener class-name="utilities.TestListener" />
  <test name="Test Chrome implicitNotVisible">
  <parameter name="targetEnvironment" value="Chrome" />
   <parameter name="network" value="" />
   <parameter name="networkLatency" value="" />
      <class name="AmazonTesting.SleepTestSystem">
     <include name="implicitNotVisible" />