Stack trace 如何在c中禁用发布配置的堆栈跟踪#

Stack trace 如何在c中禁用发布配置的堆栈跟踪#,stack-trace,Stack Trace,我已经为HttpWebRequest编写了specflow测试。当我在teamcity服务器中运行它们时,对于每个失败的断言,我都会得到堆栈跟踪。我不希望在日志中报告堆栈跟踪。我使用版本配置来运行测试,并以测试运行程序的身份运行vstestconsole…提前感谢您的解决方案 Assert.AreEqual失败。预期:。实际值:。请求返回的状态“200正常”与预期状态“404未找到”不匹配。 [15:22:39][Step 3/3] Stack Trace: [15:22:39][Step 3/

我已经为HttpWebRequest编写了specflow测试。当我在teamcity服务器中运行它们时,对于每个失败的断言,我都会得到堆栈跟踪。我不希望在日志中报告堆栈跟踪。我使用版本配置来运行测试,并以测试运行程序的身份运行vstestconsole…提前感谢您的解决方案

Assert.AreEqual失败。预期:。实际值:。请求返回的状态“200正常”与预期状态“404未找到”不匹配。

[15:22:39][Step 3/3] Stack Trace:
[15:22:39][Step 3/3]    at abc.API.xyz.Tests.Steps.GeneralSteps.CheckStatusCode(String statusCode)
[15:22:39][Step 3/3]    at lambda_method(Closure , IContextManager , String )
[15:22:39][Step 3/3]    at TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration)
[15:22:39][Step 3/3]    at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments)
[15:22:39][Step 3/3]    at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(IContextManager contextManager, StepInstance stepInstance)
[15:22:39][Step 3/3]    at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep()```