Records a transaction in the VU event log, specifying whether the transaction passed.
Namespace: Facilita.Fc.RuntimeAssembly: fc_clr (in fc_clr.dll) Version: 9.5.8.37
Syntax
Parameters
- id
- Type: System String
The transaction identifier.
- startTime
- Type: System DateTime
The time at which the transaction started.
- duration
- Type: System TimeSpan
The duration of the transaction, in milliseconds.
- pass (Optional)
- Type: System Boolean
true if the transaction should be interpreted as a pass; otherwise, false.
Remarks
This method is useful if you need to measure a transaction where the start time and/or the transaction name are not known at the point the transaction starts. For example, you may wish to record a different transaction name depending on the result of a particular call to the SUT.
Examples
DateTime startTime = DateTime.Now; bool result = DoSomething(); TimeSpan duration = DateTime.Now - startTime; // Transaction name differs, depending on the result of the call if (result) { RecordTransaction("transaction1", startTime, duration, true); } else { RecordTransaction("transaction2", startTime, duration, false); }
See Also