I help maintain a very large automated regression test suite for java web applications. Because of the size of the suite, running the tests in parallel is a requirement. I need to reduce the number of test users I create, but at the same time I want to avoid any global state/concurrency issues.

What solutions do you have for reducing the number of tests users you create in your automated regression suite?

3 Answers 3


One possibility: Run each thread against its own instance of the application. Depending on the cost of instances, this may be too expensive. But it does eliminate crosstalk among tests.


Whenever I am writing automation around "New" logins, you really have to ask yourself: "Is this new user necessary?" a lot of times in my earlier years I would create a new user each time I did a test, and realized I only needed to create a few to handle all of my testing steps. This may not be the prettiest answer, but following best practices will minimize the number of "Useless" tests that don't add value to your testing suite. This does require you to refactor quite a bit of your code, but that is really the only answer I know of. Make sure you absolutely need to create a new user for the test that you are running.


The first thing I would start with is ensuring that you aren't testing more than one type of user repeatedly. Check out "equivalence partitioning".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.