Exemplo n.º 1
0
        internal void GenerateTestRunDetails()
        {
            var _suite = Regex.Split(GetType().Namespace, "\\.");

            IBaseUtils baseUtil = BaseUtil;

            testName        = baseUtil.GetTestName();
            testSuite       = _suite[_suite.Length - 1];
            testPriority    = baseUtil.GetTestPriority();
            testCaseNumber  = baseUtil.GetTestCaseNumber();
            testComponent1  = baseUtil.GetTestComponent1();
            testComponent2  = baseUtil.GetTestComponent2();
            testDescription = baseUtil.GetTestDescription();

            testRunDetails = new string[]
            {
                testSuite,
                testPriority,
                testCaseNumber,
                testComponent1,
                testComponent2,
                testEnv.ToString(),
                tenantName.ToString()
            };
        }
Exemplo n.º 2
0
        public static ExtentTest CreateTest(this ExtentReports reportInstance, string testCaseNumber, string testName, TenantNameType tenantName, TestEnvironmentType testEnv)
        {
            try
            {
                string tenantEnv = $" - Tenant : {tenantName.ToString()}({testEnv.ToString()})";
                string name      = $"{testCaseNumber} : {Regex.Replace(testName, "_", " ")} {tenantEnv}";

                _test = reportInstance.CreateTest(name);
            }
            catch (Exception e)
            {
                log.Debug($"##### Exception occured in CreateTest method : \n{e.Message}");
            }

            return(_test);
        }