Пример #1
0
        static void ConfigureTestRail()
        {
            Rail   rail            = new Rail();
            string runId           = ConfigurationManager.AppSettings["RUN_ID"].ToString();
            string isTRailEnabled  = ConfigurationManager.AppSettings["TESTRAIL_ENABLED"].ToString();
            string isGenerateRunID = ConfigurationManager.AppSettings["GENERATE_RUN"].ToString();

            if (isTRailEnabled.ToLower() == "true")
            {
                if (string.IsNullOrEmpty(runId) && isGenerateRunID.ToLower() == "true")
                {
                    rail.AddRun();
                }
                else if (string.IsNullOrEmpty(runId) && isGenerateRunID.ToLower() == "false")
                {
                    rail.GetRunId();
                }
                else if (!string.IsNullOrEmpty(runId))
                {
                    // do nothing
                }
            }
        }