Exemple #1
0
        static void Main(string[] args)
        {
            // Getting the Singleton object of TestSuit
            TestSuite obj = TestSuite.getInstance();

            // Calling the Initialization to initialize the test case list
            Initialize.Initialization();
            // Adding the test cases object into the Dictionary from the test case list
            TestSuite.AddTestCases();
            // Running the test cases
            TestSuite.RunTestCases();
            // Publishing the test result on console
            TestSuite.PublishTestResult();
            // Delete the Singleton object
            TestSuite.delInstance();
            Console.WriteLine("Press any key to exit.");
            Console.ReadKey();
        }
Exemple #2
0
        //Coverting test case string to list of test cases
        private static void TestCasesList()
        {
            // Get the test case string from Initialize class
            string testCasesString = Initialize.GetTestCases();

            // If test case string is not empty
            if (testCasesString != "")
            {
                // Create a list of test cases
                testCaseList = testCasesString.Split(',').ToList();
            }
            // If test case string is empty
            // Throw an exception
            else
            {
                throw new ArgumentNullException(testCasesString, "Unable to get test case string, is it declared in \"TC_Names=\" attribute in config.txt");
            }
        }