Ejemplo n.º 1
0
        public void ValidateRunModes(String suiteName, String testName, String dataRunMode)
        {
            bool isSuiteSelected = SelectionHelper.IsSuiteSelected(suiteName, Resources.SuitesFile);
            bool isTestSelected  = SelectionHelper.IsTestSelected(testName, );
            bool isRunModeYes    = dataRunMode.Equals("Y", StringComparison.OrdinalIgnoreCase);

            if (!(isSuiteSelected && isTestSelected && isRunModeYes))
            {
                throw new Exception(String.Format(
                                        "Skipping Test {0}(RunMode: {1}) in Suite {2}(RunMode:{3}) with DataRunMode {4}",
                                        testName, isTestSelected, suiteName, isSuiteSelected, dataRunMode));
            }
        }
Ejemplo n.º 2
0
        protected void ValidateRunMode(String suiteName, String testName, String runMode)
        {
            APP_LOGGER.Debug("Validating RunMode");
            bool isSuiteSelected = SelectionHelper.IsSuiteSelected(ResourceTestFilePaths.SuitesExcelFilePath,
                                                                   suiteName);
            bool isTestSelected = SelectionHelper.IsTestSelected(ResourceTestFilePaths.SuiteAExcelFilePath,
                                                                 testName);
            bool isDataSelected = runMode.Equals("Y", StringComparison.OrdinalIgnoreCase) ? true : false;

            if (!(isSuiteSelected && isTestSelected && isDataSelected))
            {
                Assert.Ignore(String.Format("Skipping Test - SuiteRunMode: {0}, TestRunMode: {1}, DataRunMode: {2}",
                                            isSuiteSelected, isTestSelected, isDataSelected));
            }
        }
Ejemplo n.º 3
0
        public void TestMethod1()
        {
            bool selected = SelectionHelper.IsSuiteSelected("SuiteA", "Data\\Suite.xlsx");

            selected = SelectionHelper.IsSuiteSelected("SuiteB", "Data\\Suite.xlsx");
            selected = SelectionHelper.IsSuiteSelected("SuiteC", "Data\\Suite.xlsx");

            selected = SelectionHelper.IsTestSelected("Test1", "Data\\SuiteA.xlsx");
            selected = SelectionHelper.IsTestSelected("Test2", "Data\\SuiteA.xlsx");
            selected = SelectionHelper.IsTestSelected("Test3", "Data\\SuiteA.xlsx");
            selected = SelectionHelper.IsTestSelected("Test4", "Data\\SuiteA.xlsx");
            selected = SelectionHelper.IsTestSelected("Test5", "Data\\SuiteA.xlsx");

            SelectionHelper.GetTestData("Test2", "Data\\SuiteA.xlsx");
        }
Ejemplo n.º 4
0
 public void SuiteSelectionTest()
 {
     APP_LOGGER.Info(SelectionHelper.IsSuiteSelected(ResourceTestFilePaths.SuitesExcelFilePath, "SuiteA"));
     APP_LOGGER.Info(SelectionHelper.IsSuiteSelected(ResourceTestFilePaths.SuitesExcelFilePath, "SuiteB"));
     APP_LOGGER.Info(SelectionHelper.IsSuiteSelected(ResourceTestFilePaths.SuitesExcelFilePath, "SuiteC"));
 }