static void AppVeyorAddTest(string testName, string testFramework, string fileName, string outcome, long?durationMilliseconds,
                                    string errorMessage, string errorStackTrace, string stdOut, string stdErr)
        {
            if (!AppVeyorClient.IsRunningInAppVeyor)
            {
                return;
            }

            var body = new AddUpdateTestRequest
            {
                TestName             = testName,
                TestFramework        = testFramework,
                FileName             = fileName,
                Outcome              = outcome,
                DurationMilliseconds = durationMilliseconds,
                ErrorMessage         = errorMessage,
                ErrorStackTrace      = errorStackTrace,
                StdOut = TrimStdOut(stdOut),
                StdErr = TrimStdOut(stdErr)
            };

            try
            {
                AppVeyorClient.SendRequest("api/tests", "POST", body);
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine("Error communicating AppVeyor Build Worker API: " + ex.Message);
            }
        }
Esempio n. 2
0
        public void UpdateTest(string testName, string testFramework, string fileName,
            string outcome, long? durationMilliseconds, string errorMessage, string errorStackTrace, string stdOut, string stdErr)
        {
            if (GetApiUrl() == null)
            {
                return;
            }

            var body = new AddUpdateTestRequest
            {
                TestName = testName,
                TestFramework = testFramework,
                FileName = fileName,
                Outcome = outcome,
                DurationMilliseconds = durationMilliseconds,
                ErrorMessage = errorMessage,
                ErrorStackTrace = errorStackTrace,
                StdOut = TrimStdOut(stdOut),
                StdErr = TrimStdOut(stdErr)
            };

            try
            {
                using (WebClient wc = GetClient())
                {
                    wc.UploadData("api/tests", "PUT", Json(body));
                }
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine("Error communicating AppVeyor Build Worker API: " + ex.Message);
            }
        }
Esempio n. 3
0
        public static void UpdateTest(string testName, string testFramework, string fileName, string outcome, long?durationMilliseconds,
                                      string errorMessage, string errorStackTrace, string stdOut, string stdErr)
        {
            if (GetApiUrl() == null)
            {
                return;
            }

            var body = new AddUpdateTestRequest
            {
                TestName             = testName,
                TestFramework        = testFramework,
                FileName             = fileName,
                Outcome              = outcome,
                DurationMilliseconds = durationMilliseconds,
                ErrorMessage         = errorMessage,
                ErrorStackTrace      = errorStackTrace,
                StdOut = TrimStdOut(stdOut),
                StdErr = TrimStdOut(stdErr)
            };

            try
            {
                using (var wc = GetClient())
                    wc.UploadData("api/tests", "PUT", Json(body));
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine("Error communicating AppVeyor Build Worker API: " + ex.Message);
            }
        }
Esempio n. 4
0
        void AppVeyorAddTest(string testName, string testFramework, string fileName, string outcome, long?durationMilliseconds,
                             string errorMessage, string errorStackTrace, string stdOut, string stdErr)
        {
            var body = new AddUpdateTestRequest
            {
                TestName             = testName,
                TestFramework        = testFramework,
                FileName             = fileName,
                Outcome              = outcome,
                DurationMilliseconds = durationMilliseconds,
                ErrorMessage         = errorMessage,
                ErrorStackTrace      = errorStackTrace,
                StdOut = TrimStdOut(stdOut),
                StdErr = TrimStdOut(stdErr)
            };

            try
            {
                AppVeyorClient.SendRequest(Logger, $"{baseUri}/api/tests", "POST", body);
            }
            catch (Exception ex)
            {
                Logger.LogError("Error communicating AppVeyor Build Worker API: " + ex.Message);
            }
        }
        void AppVeyorUpdateTest(string testName, string testFramework, string fileName, string outcome, long?durationMilliseconds,
                                string errorMessage, string errorStackTrace, string stdOut)
        {
            var body = new AddUpdateTestRequest
            {
                TestName             = testName,
                TestFramework        = testFramework,
                FileName             = fileName,
                Outcome              = outcome,
                DurationMilliseconds = durationMilliseconds,
                ErrorMessage         = errorMessage,
                ErrorStackTrace      = errorStackTrace,
                StdOut = TrimStdOut(stdOut),
            };

            client.UpdateTest(body);
        }
Esempio n. 6
0
        void AppVeyorAddTest(string testName, string testFramework, string fileName, string outcome, long?durationMilliseconds,
                             string errorMessage, string errorStackTrace, string stdOut)
        {
            var body = new AddUpdateTestRequest
            {
                TestName             = testName,
                TestFramework        = testFramework,
                FileName             = fileName,
                Outcome              = outcome,
                DurationMilliseconds = durationMilliseconds,
                ErrorMessage         = errorMessage,
                ErrorStackTrace      = errorStackTrace,
                StdOut = TrimStdOut(stdOut),
            };

            AppVeyorClient.SendRequest(Logger, $"{baseUri}/api/tests", HttpMethod.Post, body);
        }
        static void AppVeyorAddTest(string testName, string testFramework, string fileName, string outcome, long? durationMilliseconds,
                                    string errorMessage, string errorStackTrace, string stdOut, string stdErr)
        {
            if (!AppVeyorClient.IsRunningInAppVeyor)
                return;

            var body = new AddUpdateTestRequest
            {
                TestName = testName,
                TestFramework = testFramework,
                FileName = fileName,
                Outcome = outcome,
                DurationMilliseconds = durationMilliseconds,
                ErrorMessage = errorMessage,
                ErrorStackTrace = errorStackTrace,
                StdOut = TrimStdOut(stdOut),
                StdErr = TrimStdOut(stdErr)
            };

            try
            {
                AppVeyorClient.SendRequest("api/tests", "POST", body);
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine("Error communicating AppVeyor Build Worker API: " + ex.Message);
            }
        }
        void AppVeyorAddTest(string testName, string testFramework, string fileName, string outcome, long? durationMilliseconds,
                             string errorMessage, string errorStackTrace, string stdOut)
        {
            var body = new AddUpdateTestRequest
            {
                TestName = testName,
                TestFramework = testFramework,
                FileName = fileName,
                Outcome = outcome,
                DurationMilliseconds = durationMilliseconds,
                ErrorMessage = errorMessage,
                ErrorStackTrace = errorStackTrace,
                StdOut = TrimStdOut(stdOut),
            };

            AppVeyorClient.SendRequest(Logger, $"{baseUri}/api/tests", HttpMethod.Post, body);
        }
        void AppVeyorUpdateTest(string testName, string testFramework, string fileName, string outcome, long? durationMilliseconds,
                                string errorMessage, string errorStackTrace, string stdOut)
        {
            var body = new AddUpdateTestRequest
            {
                TestName = testName,
                TestFramework = testFramework,
                FileName = fileName,
                Outcome = outcome,
                DurationMilliseconds = durationMilliseconds,
                ErrorMessage = errorMessage,
                ErrorStackTrace = errorStackTrace,
                StdOut = TrimStdOut(stdOut),
            };

            client.UpdateTest(body);
        }
        void AppVeyorAddTest(string testName, string testFramework, string fileName, string outcome, long? durationMilliseconds,
                             string errorMessage, string errorStackTrace, string stdOut, string stdErr)
        {
            var body = new AddUpdateTestRequest
            {
                TestName = testName,
                TestFramework = testFramework,
                FileName = fileName,
                Outcome = outcome,
                DurationMilliseconds = durationMilliseconds,
                ErrorMessage = errorMessage,
                ErrorStackTrace = errorStackTrace,
                StdOut = TrimStdOut(stdOut),
                StdErr = TrimStdOut(stdErr)
            };

            try
            {
                AppVeyorClient.SendRequest(Logger, $"{baseUri}/api/tests", "POST", body);
            }
            catch (Exception ex)
            {
                Logger.LogError("Error communicating AppVeyor Build Worker API: " + ex.Message);
            }
        }