Bird
0
0

Why does TestNG recommend setting thread-count carefully when configuring parallel execution?

hard📝 Conceptual Q10 of 15
Selenium Java - TestNG Integration
Why does TestNG recommend setting thread-count carefully when configuring parallel execution?
AThread-count controls the number of test retries
BThread-count has no effect on test execution speed
CLow thread-count always causes tests to fail
DToo high thread-count can cause resource exhaustion and flaky tests
Step-by-Step Solution
Solution:
  1. Step 1: Understand thread-count impact on resources

    High thread-count means many threads run simultaneously, consuming CPU, memory, and browser instances.
  2. Step 2: Recognize risks of too many threads

    Excessive threads can overload system, causing slowdowns, flaky or failed tests due to resource contention.
  3. Final Answer:

    Too high thread-count can cause resource exhaustion and flaky tests -> Option D
  4. Quick Check:

    Set thread-count to balance speed and stability [OK]
Quick Trick: High thread-count risks resource exhaustion and flaky tests [OK]
Common Mistakes:
  • Thinking thread-count does not affect speed
  • Believing low thread-count causes failures
  • Confusing thread-count with retry count

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Selenium Java Quizzes