- Trending Categories
- Data Structure
- Operating System
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to achieve parallel execution in TestNG?
We can achieve parallel execution with the help of TestNG. There is a parallel attribute in TestNG which is used for this implementation. The parallel execution in TestNG is associated with another attribute called thread-count.
The parallel attribute can have the values listed below −
Testng xml file.
<?xml version = "1.0" encoding = "UTF-8"?> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > <suite name = "Tutorialspoint Test" parallel ="tests" thread-count= ="5"> <test name = "Test Cycle 1"> <groups> <run> <include name = "Smoke"/> </run> </groups> <classes> <class name = "TestQA" /> </classes> </test> </suite>
The execution will trigger in parallel mode for tests with the thread count of 5.
- How to perform parameterization in execution in TestNG?
- How to overlook a particular test method from execution in TestNG?
- How to skip or ignore the execution of tests in TestNG?
- How to retrieve test method description in TestNG before and after execution?
- How to retrieve test method name in TestNG before and after execution?
- How to get the test group name in TestNG before and after execution?
- Android AsyncTasks Parallel Execution
- How Parallel and Sequence execution works in PowerShell Workflow?
- What is the order of execution of tests in TestNG?
- What is Parallel Execution in Computer Architecture?
- What is the order of execution of TestNG methods?
- What is the order of test execution with priority in TestNG?
- How to incorporate and remove test methods from execution from a\ncollection of test cases in TestNG?
- How does the execution of a particular test method depend on other test\nmethods in TestNG?
- What is the difference between Concurrency and Parallel Execution in Computer Architecture?