0
0
Selenium Javatesting~10 mins

Test parallelization in CI in Selenium Java - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the number of threads for parallel test execution in TestNG.

Selenium Java
suite.setParallel("[1]");
Drag options to blanks, or click blank then click option'
Amethods
Btests
Cclasses
Dinstances
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'methods' runs individual test methods in parallel, not whole classes.
Using 'tests' runs test tags in parallel, which is different from classes.
2fill in blank
medium

Complete the code to set the thread count for parallel tests in TestNG.

Selenium Java
suite.setThreadCount([1]);
Drag options to blanks, or click blank then click option'
A5
B1
C3
D10
Attempts:
3 left
💡 Hint
Common Mistakes
Setting thread count to 1 disables parallelism.
Choosing too low thread count limits parallel execution.
3fill in blank
hard

Fix the error in the TestNG XML configuration to enable parallel test execution.

Selenium Java
<suite name="Suite1" parallel="[1]" thread-count="5">
Drag options to blanks, or click blank then click option'
Aclasses
Btrue
Cfalse
Dparallel
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'true' or 'false' as the value causes configuration errors.
Using 'parallel' as a value is invalid.
4fill in blank
hard

Fill both blanks to configure TestNG for parallel execution of test methods with 8 threads.

Selenium Java
<suite name="Suite2" parallel="[1]" thread-count="[2]">
Drag options to blanks, or click blank then click option'
Amethods
Bclasses
C8
D5
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing 'classes' with thread count 5 when 8 is needed.
Using invalid parallel values.
5fill in blank
hard

Fill all three blanks to create a TestNG XML snippet that runs tests in parallel by instances with 4 threads and a suite name 'ParallelSuite'.

Selenium Java
<suite name="[1]" parallel="[2]" thread-count="[3]">
Drag options to blanks, or click blank then click option'
AParallelSuite
Binstances
C4
Dmethods
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'methods' instead of 'instances' for parallel mode.
Setting thread count to a wrong number.