Well i have the following problem. I want to stress test an application of mine that is deployed on a Tomcat server. The case i want to test is the following: a user uploads a file, the file is transcoded to another format and the new file is downloaded back to a user's device. I simulate every user with a thread(with three operations modeled as three methods). I create a thread pool executor of type newFixedThreadPool(30) and i execute the three methods in the run method of a class that implements Runnable, which is called in a for loop for 300 iterations for example(each iteration is a new user). In main:
ExecutorService executor = Executors.newFixedThreadPool(NTHREDS);
for (int i = 0; i < 300; i++) {
Runnable worker = new MyRunnable(i);
executor.execute(worker);
}
executor.shutdown();
and in MyRunnable class
public void run() {
testPostFile(); testPSXFileRename(); testGetFile(); }
public static void testPostFile() {}
public static void testPSXFileRename() {}
public static void testGetFile();
Is my approach correct? Or are there tricky parts that i missed
1st Thread=1 User(Post, Transcode, Get)
2nd Thread=1 User(Post, Transcode, Get) etc. Thanks in advance Antonis