Automate Test Scenario that uses multiple accounts

1 Answer 25 Views
Test Recording
Maria
Top achievements
Rank 1
Iron
Maria asked on 04 Jan 2024, 01:14 AM

Hello,

 

I need to automate functionality on a web app where 2 accounts are logged to the app at the same time and viewing/modifying the same page at the same time.

The scenario goes like this.

User1 does some action and saves it

User2 does an action that's related to the action User1 executed and tries to save

A message displays to User2 that the page was modified by X user

Has anyone automated this type of scenario, with 2 users logged in concurrently?  How did you go about it?

Thank you for any guidance anyone can provide.

 

 

1 Answer, 1 is accepted

Sort by
0
Alexander
Telerik team
answered on 04 Jan 2024, 01:35 PM

Hello Maria,

There is one way of achieving this. It is a little bit tricky as you have to know your application very well in order for this to work. 
In short, you create two tests representing each user's actions. That is the most crucial part as you'll have to know how much time each "user" (test) must wait for the other to finish with its current action. Then you put those two tests in one test list and execute them simultaneously with the scheduling feature on two different machines - this step requires at least one more machine that is set up to use the Run-Time edition. 
Here are the essential steps and materials you can follow to create such scenario:

1. Create two tests each containing the actions of a user. Keep in mind that those tests will be executed simultaneously which means that their steps will overlap. This will surely cause misbehaviors as the page used for testing will be the same for each test. To prevent this from happening you'll need to add execution delays throughout each test. Those delays depend on how the application is performing and your knowledge on it will determine exactly how long they should be.

2. After the tests are ready, you'll need to prepare the other machine used for this. You can follow these articles to set it up:

3. Once the machines are ready, you'll need to make a test list containing the previously created tests.

4. Schedule a test list execution that will use both of your machines and execute the tests from list distributed. See this article on how to do so.

* Don't forget to enable the "Distribute tests among these machines" option as it is very important for this scenario.

5. You can check the results under the "Results" tab

 

Hope this helps. If I left anything unclear, don't hesitate to ask. 
If there is something more specific, you want to discuss you can always create a private support thread where we can discuss and share information that is not meant for the public forum.

Regards, Alexander Progress Telerik

Virtual Classroom is the free self-paced technical training portal that gets you up to speed with Telerik and Kendo UI products including Telerik Test Studio! Check it out at https://learn.telerik.com/.
Tags
Test Recording
Asked by
Maria
Top achievements
Rank 1
Iron
Answers by
Alexander
Telerik team
Share this question
or