Exactly what is failing? What error messages are you getting? What are you considering a "failed" load test?
The reason I ask these questions is that it is entirely possible that the fault may be in the webservice. Until we know what exactly the errors are, we cannot say what is going on.
Now, that said, the code you posted only seems to apply to a single virtual user. I don't see anything in that code giving indication of other virtual users being created and assigned the tasks. Do you have other additional code that is doing that? Please post what you can.
Automated Testing Evangelists
Definition expert - noun - Unknown drip under pressure
If you look into my code for onLoadTestingRequest, where I am trying to load xml to MainDoc variable and assigning MainDoc[documentElement] to doc variable.
My problem is with MainDoc variable, after executing the script for two virtual users and executing for third virtual user MainDoc is getting blank and due to this Doc is getting null and my script is failing.
I wrote the script only for one virtual user, and executing it through LoadTesting Tests by giving 3 virtual users for User Count. Is this the wrong way to do, please help me.
We have examined the log file you sent us. It seems to me that additional users were not able to authenticate correctly. That is, all of them use the same authentication information, and therefore, only the first user can work correctly. I recommend that you examine your script and make sure that all needed IDs, user names and passwords for different virtual users are different.
If this suggestion does not help, please zip your entire TestComplete project suite directory along with logs of the failed test execution and send us the archive so we can examine the problematic requests on our side.