1

include and exclude are not working in testng of selenium, please inform the reason behind it

enter image description here

enter image description here

enter image description here

sound wave
  • 3,191
  • 3
  • 11
  • 29
divya
  • 11
  • 1

1 Answers1

0

You need to give test method name in <exclude /> tag. But, from the screenshot, I can see that you haven't given the method name but some string. To exclude test methods "ploan" and "MobilelOGINcarloan", give these names in exclude tag as below:

<?xml version=“1.0” encode=“UTF-8”?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite thread-count = “10” name=“Loan Department”>
  <test name=“Personal loan”>
    <classes>
      <class name=“rangu.amma2”>
        <methods>
          <exclude name=“ploan” />
        </methods>
      </class>
    </classes>
  </test> <!-- Personal loan -->

  <test name=“Car loan”>
    <classes>
      <class name=“rangu.amm3”>
        <methods>
          <exclude name=“MobilelOGINcarloan />
        </methods>
      </class> <!-- test.day3 -->
    </classes>
  </test> <!-- Car Loan -->
</suite> <!-- Loan Department -->
Harish
  • 306
  • 1
  • 4
  • 14