Visual studio 2012 在VisualStudio负载测试期间编写自定义事务时间

Visual studio 2012 在VisualStudio负载测试期间编写自定义事务时间,visual-studio-2012,transactions,load-testing,Visual Studio 2012,Transactions,Load Testing,是否有方法在VisualStudio中的负载测试期间写入自定义事务时间。通常,要记录事务时间,请将事务放在BeginTimer和EndTimer方法之间,如下所示: TestContext.BeginTimer("TransactionName"); // Do stuff for the transaction here TestContext.EndTimer("TransactionName"); 在我的代码中,我已经存储了事务的时间。有没有办法让我报告这件事?大概是这样的: Write

是否有方法在VisualStudio中的负载测试期间写入自定义事务时间。通常,要记录事务时间,请将事务放在BeginTimer和EndTimer方法之间,如下所示:

TestContext.BeginTimer("TransactionName");
// Do stuff for the transaction here
TestContext.EndTimer("TransactionName");
在我的代码中,我已经存储了事务的时间。有没有办法让我报告这件事?大概是这样的:

WriteTimer("TransactionName", time);

我希望在Visual Studio创建的测试摘要中查看结果。

使用BeginTransaction和EndTransaction方法代替BeginTimer和EndTimer:

TestContext.BeginTransaction ("TransactionName");
// Do stuff for the transaction here
TestContext.EndTransaction ("TransactionName");

“TransactionName”的结果将显示在测试摘要中。

它是否也将添加到LoadTest数据库中?如果没有,我们如何添加它?