Exemplo n.º 1
0
        /// <summary>
        /// record a result with testlink;
        /// </summary>
        /// <param name="testCaseId"></param>
        /// <param name="status"></param>
        /// <param name="notes"></param>
        /// <returns></returns>
        public GeneralResult RecordTheResult(int testCaseId, TestCaseResultStatus status, string notes)
        {
            GeneralResult result = null;

            if (ConnectionValid == true)
            {
                result = proxy.ReportTCResult(testCaseId, testPlanId, status, platformName: platformName, notes: notes.ToString());
            }
            else
            {
                result = new GeneralResult("Invalid Connection", false);
            }
            return(result);
        }
        /// <summary>
        /// record a result with testlink;
        /// </summary>
        /// <returns></returns>
        public GeneralResult RecordTheResult(string testName, string testSuite, TestCaseResultStatus status, string notes)
        {
            GeneralResult result = null;

            if (ConnectionValid == true)
            {
                int testCaseId = AddTestIfNotExisting(testName, testSuite);
                if (testCaseId == 0)
                {
                    result = new GeneralResult("Unable to find/add testcase", false);
                }
                else
                {
                    result = proxy.ReportTCResult(testCaseId, projectData.TestplanId, status, platformName: projectData.Platform, notes: notes.ToString(), buildid: projectData.BuildId);
                }
            }
            else
            {
                result = new GeneralResult("Invalid Connection", false);
            }
            return(result);
        }