Testng is a very good test framework, really from the test point of view, for the test to think. In the testing process, we often encounter a scenario to do concurrent requests, mainly want to know if the program in the concurrency will be abnormal or not consider the other situation, this is often not to do performance testing, and not because of this and to use LR to do this thing. If you know more about testng, you'll find that requires just 2 simple annotations.
1. The main use of the @test in the 2 attributes, one is ThreadPoolSize and Invocationcount, respectively, the thread pool size, and the number of calls
The thread pool belongs to the object pools. All object pools have a very important commonality in order to maximize the reuse of objects. The most important feature of the thread pool is to maximize the use of threads. The thread pool is generally used to control the threads used by the system and to conserve resource overhead. However, not every system is suitable for use with thread pooling.
2. The test code is as follows:
public class testmultidemo{@Test (threadpoolsize=10,invocationcount=5) public void Testthread () {System.out.prin TLN ("Test.."); }}
More information: www.kootest.com; Technology Exchange Group: 182526995
Multithreading concurrency Testing with testng annotations