Bird
0
0

Identify the error in this TestNG XML snippet for parallel execution:

medium📝 Debug Q6 of 15
Selenium Java - TestNG Integration
Identify the error in this TestNG XML snippet for parallel execution:
<suite name="Suite" parallel="methods" thread-count="two">
  <test name="Test1">
    <classes>
      <class name="TestClass1"/>
    </classes>
  </test>
</suite>
Aparallel attribute cannot be set to methods
BMissing closing tag for test
Cthread-count value should be a number, not a word
Dclass name attribute is invalid
Step-by-Step Solution
Solution:
  1. Step 1: Check thread-count attribute value

    The value of thread-count must be a numeric integer, not a word.
  2. Step 2: Validate other attributes and tags

    parallel="methods" is valid, tags are properly closed, and class name attribute is correct.
  3. Final Answer:

    thread-count value should be a number, not a word -> Option C
  4. Quick Check:

    thread-count must be numeric [OK]
Quick Trick: thread-count must be numeric, not text [OK]
Common Mistakes:
  • Using words instead of numbers for thread-count
  • Assuming parallel="methods" is invalid
  • Missing XML closing tags

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Selenium Java Quizzes