在 visual studio 在线获取完整的 nUnit 输出
Obtaining full nUnit output in visual studio online
我已经设置了我的 VS 2013 环境以在 Visual Studio Online 中与 TFS 集成。我已将 CI 构建配置为 运行,然后在完成后 运行 我的所有测试(nUnit 框架)。然而,当测试完成并且我看到输出时,它只说明每个测试是通过还是失败,而不是我在代码中调用的断言语句的详细信息,即实际发生了什么错误。
所以它会说
GetPosMenus 失败
但是如果我 运行 在 VS2013 中进行本地测试,我会看到完整的错误
GetPosMenus failed
Initialization method Data.Test.PosMenuDataRepositoryTests.LoadData threw exception. System.ArgumentOutOfRangeException: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index.
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at System.Collections.Generic.List`1.get_Item(Int32 index)
at Testing.Shared.DataPopulation.Pos.PosMenuDataPopulator.LoadPosMenusIntoDatabase(IUnitOfWork work, IList`1 data, IList`1 venues) in PosMenuDataPopulator.cs: line 48
at5 Data.Test.PosMenuDataRepositoryTests.LoadData() in PosMenuDataRepositoryTests.cs: line 50
如何配置在线构建引擎以提供完整的输出?
您可以在您的 VSO 在线帐户和 Visual Studio 内查看此内容。
对比中:
Team Explorer 主页 -> 构建
在所有构建定义下,双击您感兴趣的构建定义。
这应该会打开一个包含已完成构建历史记录的选项卡。默认历史记录设置为今天,您需要更改日期过滤器才能查看旧版本。另请注意,可见的构建历史将取决于您在构建定义中设置的保留策略。
双击您的构建,您应该会看到以下屏幕。展开测试结果,应该可以看到异常
我已经设置了我的 VS 2013 环境以在 Visual Studio Online 中与 TFS 集成。我已将 CI 构建配置为 运行,然后在完成后 运行 我的所有测试(nUnit 框架)。然而,当测试完成并且我看到输出时,它只说明每个测试是通过还是失败,而不是我在代码中调用的断言语句的详细信息,即实际发生了什么错误。
所以它会说
GetPosMenus 失败
但是如果我 运行 在 VS2013 中进行本地测试,我会看到完整的错误
GetPosMenus failed
Initialization method Data.Test.PosMenuDataRepositoryTests.LoadData threw exception. System.ArgumentOutOfRangeException: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index.
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at System.Collections.Generic.List`1.get_Item(Int32 index)
at Testing.Shared.DataPopulation.Pos.PosMenuDataPopulator.LoadPosMenusIntoDatabase(IUnitOfWork work, IList`1 data, IList`1 venues) in PosMenuDataPopulator.cs: line 48
at5 Data.Test.PosMenuDataRepositoryTests.LoadData() in PosMenuDataRepositoryTests.cs: line 50
如何配置在线构建引擎以提供完整的输出?
您可以在您的 VSO 在线帐户和 Visual Studio 内查看此内容。
对比中:
Team Explorer 主页 -> 构建
在所有构建定义下,双击您感兴趣的构建定义。
这应该会打开一个包含已完成构建历史记录的选项卡。默认历史记录设置为今天,您需要更改日期过滤器才能查看旧版本。另请注意,可见的构建历史将取决于您在构建定义中设置的保留策略。
双击您的构建,您应该会看到以下屏幕。展开测试结果,应该可以看到异常