When recording a new scenario from scratch and by default, you will notice you are guided to use a same single user, as described at Recording a scenario.
However, you may choose to record scenarios while considering performers as well and end up validating that your process workflow have well-defined work allocation and access rights.
This section describes how to switch users while recording a scenario so that it is then run with these multiples users.
How it works?
In order to consider performers in automatic testing, you will end up saving 1 scenario for each bit in which a user participates.
How this supports multiple performers is by linking the scenarios and continuing by recording scenarios using the Based on existing option.
Before moving on, recall that we recommend recording scenarios with the domain\admon system user, since you may also modify and define each task's performer later on.
For more information about how to perform such modifications, refer to Modifying scenarios.
In order to introduce work allocations to your scenario, follow these steps:
1. Begin a new recording the same as you would do for a single-user scenario.
This means for starters, using the Record scenario option and logging in with the user that works on the first task.
Notice this user will need to NOT be marked with the Skip assignment on cases created by me property.
And create a new process to work on it up until the first portion of the process (e.g, possibly only completing the first task).
Once finished, review which user has been assigned to the next pending task.
Then stop the recording by using clicking the Stop button.
This creates the first test scenario file for this approach.
You will need to remember the name of the saved scenario.
2. Select Change user to now login with that user that was allocated to the next pending task.
3. Click Based on existing to select the file you just recorded to continue with the scenario.
4. Work with this user to complete his/her activities until applicable.
Similarly as before, ensure you keep track of which user is then involved in the process (assigned to the upcoming task), and to finally stop the recording.
Repeat the procedure as many times as necessary while ensuring you Always select the LAST scenario recorded (this way you will build a file that chains all previous data and scenarios with their respective users).
At this point, you are set to execute automatic testing on your processes.
For more information about this next step, refer to Executing scenarios.