include and exclude are not working in testng of selenium, please inform the reason behind it
Asked
Active
Viewed 43 times
1

sound wave
- 3,191
- 3
- 11
- 29

divya
- 11
- 1
-
post text based code not images. – Rolandas Ulevicius Mar 01 '23 at 17:43
-
Add code in text format!! – Yash Mehta Mar 02 '23 at 07:09
1 Answers
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