Bird
0
0

In testng.xml, which tag is used to group test classes under a single test?

easy📝 Conceptual Q2 of 15
Selenium Java - TestNG Integration
In testng.xml, which tag is used to group test classes under a single test?
A<code><class></code>
B<code><suite></code>
C<code><test></code>
D<code><package></code>
Step-by-Step Solution
Solution:
  1. Step 1: Identify the tag that groups classes

    The <test> tag groups one or more classes to run as a single test.
  2. Step 2: Differentiate from other tags

    <suite> is the overall container, <class> defines individual classes, and <package> is not a standard TestNG tag.
  3. Final Answer:

    <test> groups classes under a single test -> Option C
  4. Quick Check:

    Test tag = group of classes [OK]
Quick Trick: Use to group classes in testng.xml [OK]
Common Mistakes:
  • Using instead of to group classes
  • Confusing as a group tag
  • Assuming is valid in testng.xml

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Selenium Java Quizzes