Bird
0
0

What is wrong with this TestNG XML snippet to run groups?

medium📝 Debug Q7 of 15
Selenium Java - TestNG Integration
What is wrong with this TestNG XML snippet to run groups?
<groups>
  <include name="regression"/>
</groups>
AMissing <run> tag inside <groups>
BShould use <exclude> instead of <include>
CGroup names must be uppercase
DXML tags are case-sensitive and must be lowercase
Step-by-Step Solution
Solution:
  1. Step 1: Recall correct XML structure for groups

    The <groups> tag must contain a <run> tag which then contains <include> or <exclude>.
  2. Step 2: Identify missing tag

    The snippet misses the <run> tag, making it invalid.
  3. Final Answer:

    Missing <run> tag inside <groups> -> Option A
  4. Quick Check:

    Groups XML requires <run> for includes/excludes [OK]
Quick Trick: Always wrap include/exclude inside in groups XML [OK]
Common Mistakes:
  • Omitting tag
  • Using exclude when include is needed
  • Assuming case sensitivity applies to group names

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Selenium Java Quizzes