Hello, I have a test case which i am using in a load test. In this testcase I call a webservice function for which I need a valid user. To get this valid user I query the database to get some random user. This works fine when I run a simple testcase. However in a 200 thread load test, I guess what is happening is that I open 200 connections to my database to a get a random user. One connection for each thread. This is putting extra load on the DB server which I don't want.
How can I script such that 200 scripts share the database connection. Is this possible.
My current stepstep is something like this GlobalFunctions gb = new GlobalFunctions(); gb.GetRandomUser(context, "AuthenticateUser - Request 1")
Maybe you could create a static synchronized method inside your GlobalFunctions object which would create a static connection on the first call and then reuse that for later queries.. I think this is in line what you already are trying to do !?