diff --git a/tracer/test/Datadog.Trace.TestHelpers/CustomTestFramework.cs b/tracer/test/Datadog.Trace.TestHelpers/CustomTestFramework.cs index 10651578d279..f695e1e49b41 100644 --- a/tracer/test/Datadog.Trace.TestHelpers/CustomTestFramework.cs +++ b/tracer/test/Datadog.Trace.TestHelpers/CustomTestFramework.cs @@ -210,7 +210,9 @@ protected override async Task RunTestCaseAsync(IXunitTestCase testCa if (testCase.TestMethodArguments != null) { - parameters = string.Join(", ", testCase.TestMethodArguments.Select(a => a?.ToString() ?? "null")); + // We replace ##vso to avoid sending "commands" via the log output when we're testing CI Visibility stuff + // We should redact other CI's command prefixes as well in the future, but for now this is enough + parameters = string.Join(", ", testCase.TestMethodArguments.Select(a => a?.ToString()?.Replace("##vso", "#####") ?? "null")); } var test = $"{TestMethod.TestClass.Class.Name}.{TestMethod.Method.Name}({parameters})";