/// <summary>
        /// Update Test Runs.
        /// </summary>
        /// <returns>Task.</returns>
        private static async Task UpdateTestRunsAsync()
        {
            foreach (var testRunId in NewTestRunIds)
            {
                var testresults = await AzureDevOpsUtility.GetTestResultsOfATestRunAsync(testRunId).ConfigureAwait(false);

                var resultArray = new List <object>();
                foreach (var testresult in testresults.SelectToken("value").ToList())
                {
                    var result = TestResults.TestCases.FirstOrDefault(z => z.TestCaseId.ToString().Equals(testresult.SelectToken("testCase.id").ToString()));
                    resultArray.Add(new { id = testresult.SelectToken("id"), state = Constants.Completed, outcome = result.Outcome.ToString(), durationInMs = 1000 });
                }

                await AzureDevOpsUtility.UpdateTestResultsOfATestRunAsync(testRunId, resultArray).ConfigureAwait(false);

                await AzureDevOpsUtility.UpdateTestRunAsync(Tr, testRunId).ConfigureAwait(false);
            }
        }
        /// <summary>
        /// Update Test Results from TRX file.
        /// </summary>
        /// <returns>Task.</returns>
        private static async Task UpdateTestResultsAsync()
        {
            foreach (var testRunId in NewTestRunIds)
            {
                var testresults = await AzureDevOpsUtility.GetTestResultsOfATestRunAsync(testRunId).ConfigureAwait(false);

                var resultArray = new List <object>();
                foreach (var testresult in testresults.SelectToken("value").ToList())
                {
                    var testResultsFromTrx = TestResults.Where(x => (x.ClassName + "." + x.TestName.Split('(')[0]).Equals(testresult.SelectToken("automatedTestName").ToString()));
                    var testResult         = testResultsFromTrx.Any(x => x.Outcome.Equals(Constants.Failed)) ? testResultsFromTrx.FirstOrDefault(x => x.Outcome.Equals(Constants.Failed)) : testResultsFromTrx.All(x => x.Outcome.Equals(Constants.NotExecuted)) ? testResultsFromTrx.FirstOrDefault() : testResultsFromTrx.FirstOrDefault(x => x.Outcome.Equals(Constants.Passed));
                    var(errorMessage, trace) = GetErrorMessageAndStackTrace(testResult, testResultsFromTrx);
                    resultArray.Add(new { id = testresult.SelectToken("id"), state = Constants.Completed, durationInMs = testResultsFromTrx.Sum(x => x.Duration.Value.Milliseconds), outcome = testResult.Outcome, computerName = testResult.ComputerName, errorMessage, stackTrace = trace });
                }

                await AzureDevOpsUtility.UpdateTestResultsOfATestRunAsync(testRunId, resultArray).ConfigureAwait(false);
            }
        }