-1

Let’s assume the following simple test case which is testing the functionality of a Banking system maintaining the balance of bank accounts:

Check Account #1234 Balance, which become the reference point (Ex: 1000 $) Perform Deposit of 600 $ Perform Withdraw of 400 $ Check Account #1234 Balance, expecting the balance to be 200 $ over the reference point (Ex: 1200 $)

Given project pressures you and your colleague are ask to run the test suite in a concurrent fashion (could be using different browser version), given that both of you are manipulating the same account your test is sporadically failing.

In the IP sprint you are task to come up with a solution to bring consistency to the test results regardless of the number of members executing the suite in a concurrent fashion, what are the options you would consider.

Johnn
  • 1
  • 1

1 Answers1

1

There are different ways to approach your case, I would like to list some:

1 - If the concurrency is a must and if your Check Account changes something in a Database, then would be necessary to use different accounts, one per thread of execution, this way each test can run with no concerns on what the other tests are doing.

2 - If you can push for a non-concurrent solution, then you only need to run your tests serialized and at the end of each test revert back the check account to the reference point.

3 - Another way to solve this problem is to use mock data. This solution could be a little bit more complex, and it could requiere more work. But if still you want to know more about it contact your development team and let them know about your problem so that you can find a solution together.

You can read more about mocking data here:

Hope it helps!

Enrique Lopez
  • 174
  • 2
  • 5