Here is one test. Start 20 threads, each trying to decrement a particular field of the same database record 200 times, in a loop. If at the end of the run the field value is reduced by exactly 4000, you pass.
It is my test (you have to modify some lines: how you get your data and other stuff). It's very unfriendly to read and hostile to run(if your app. is at early stage, your file most likely will be corrupted at the end) just to give you an idea. You can mold it into anything you want. It is earliest test that tests just implementation of data. Later I had for all kind of clients too.
Joined: Jun 30, 2003
thank you hi Svetlana your code is help me much,thank you again but it is random multi-thread test, i still want to know some approach to test purposeful , is it exist that can testify my Data is safety?
subject: how to simulate multi-thread to test Data ?