A virtual user in .NET is a public .NET class with the SilkPerformer.VirtualUser attribute applied. This attribute tells the add-on to generate a virtual user definition in the BDL script.
The VirtualUser attribute has one parameter - the name of the virtual user that is to be generated in the BDL script when running a try script.
You can have multiple VirtualUser classes in your .NET assembly but the names of the virtual users must be unique.
| C# Code | BDL Script |
|---|---|
[VirtualUser("Vuser1")]
public class MyTestUser1
{
...
}
[VirtualUser("Vuser2")]
public class MyTestUser2
{
...
}
|
dcluser
user
Vuser1
...
user
Vuser2
|