Transactions - Virtual User Classes

The Code Generation Engine checks all methods that have the transaction attribute applied. There are three types of transactions, init, main, and end. A Virtual User class can only have one init and one end transaction. Even if there is no init or end transaction within the .NET code, transactions are still scripted because they are required for loading and freeing the .NET objects.

The first call in the init transaction in BDL is a DotNetLoadObject method call. After this call the actual call to the .NET method is made. Thereafter all methods with the TestMethod attribute that are defined between this transaction method and the next are called.

The last call in the end transaction in BDL is a DotNetFreeObject method call.

The main transactions call the actual transaction method in .NET and then the appropriate test method calls.