void VstsUpdateTest(ITest uniqueId, string outcome, long?durationMilliseconds, string errorMessage, string errorStackTrace, string stdOut)
        {
            var body = new Dictionary <string, object>
            {
                { "outcome", outcome },
                { "durationInMs", durationMilliseconds },
                { "state", "Completed" }
            };

            var msg = $"{errorMessage}\n{errorStackTrace}\n{TrimStdOut(stdOut)}".Trim();

            if (!string.IsNullOrWhiteSpace(msg))
            {
                body.Add("errorMessage", msg);
            }

            client.UpdateTest(body, uniqueId);
        }