Exemplo n.º 1
0
        public static bool Run()
        {
            StartUp();

            /* Add your TestFramework calls here, for example:
             * EH.PCPS.TestAutomation.CommonHostApplicationLayerLoader.CommonFlows.OpenHostApplication.Run(pathToApplication);
             * EH.PCPS.TestAutomation.DeviceFunctionLoader.CoDIA.Parameterization.Flows.OpenModuleOnline.Run();
             */
            string expectedCoefficients = "";
            string tableValues          = "";
            //Referenzwerte kommen von Jochen oder Manuel von PC-F

            bool isPassed = Execution.Container.SelectTabBaseSettings();

            isPassed &= Flows.ConfigureBaseSettings.BaseConfiguration("Fine tuning settings", string.Empty, string.Empty, string.Empty, string.Empty);
            isPassed &= Execution.Container.SelectTabLiquidProperties();
            isPassed &= AssertFunctions.AreEqual(true, Validation.CheckAvailabilityOfTabPages.IsLiquidPropertiesTabPageAvailable(), "Verify that Liquid properties tab is active.");
            isPassed &= Execution.SetTableValues.SetValues(StringToListConverter.Run(tableValues));
            isPassed &= AssertFunctions.AreEqual(true, DeviceFunctionLoader.CoDIA.ConcentrationV2.Functions.MenuArea.Toolbar.Validation.IsCalculationButtonEnabled.Run(), "Verifies that calculate button is enabled.");
            isPassed &= Execution.CoefficientsOverview.CompareCoefficients("0.01", StringToStringArrayConverter.Run(expectedCoefficients));

            if (isPassed)
            {
                Log.Success(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_EnterDataForFineTuning passed.");
            }
            else
            {
                Log.Failure(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_EnterDataForFineTuning failed.");
                Log.Screenshot();
            }

            TearDown();
            return(isPassed);
        }
        public static bool Run()
        {
            StartUp();

            /* Add your TestFramework calls here, for example:
             * EH.PCPS.TestAutomation.CommonHostApplicationLayerLoader.CommonFlows.OpenHostApplication.Run(pathToApplication);
             * EH.PCPS.TestAutomation.DeviceFunctionLoader.CoDIA.Parameterization.Flows.OpenModuleOnline.Run();
             */

            // Dummy-Values um Änderungen in der Berechnung festzustellen
            string expectedCoefficients = "-0.0533;-1.3581;3.4876;-2.0645;0.3985;0.0000;0.0000;0.0000;0.0000;0.0000;0.0000;0.0000";
            string tableValues          = "5;-10;0.5;10;0;0.6;15;10;0.7;20;20;0.8;25;30;0.9;30;40;1;35;50;1.1;40;60;1.2;45;70;1.3;50;75;1.4;55;80;1.5;60;85;1.6;65;90;1.7;70;95;1.8";

            // TODO:
            // Referenzwerte kommen von Jochen oder Manuel von PC-F
            bool isPassed = true; // = Execution.Container.SelectTabBaseSettings();

            isPassed &= Flows.ConfigureBaseSettings.BaseConfiguration("Liquid properties", string.Empty, string.Empty, string.Empty, string.Empty);
            isPassed &= AssertFunctions.AreEqual(true, Validation.CheckAvailabilityOfTabPages.IsLiquidPropertiesTabPageAvailable(), "Verify that Liquid properties tab is active.");
            isPassed &= Execution.Container.SelectTabLiquidProperties();
            Execution.LiquidProperties.InputFormat = "List";
            Execution.TakeScreenshotOfModule.Run();
            isPassed &= Execution.SetTableValues.SetValues(StringToListConverter.Run(tableValues));
            isPassed &= Execution.LiquidProperties.Recalculate();
            isPassed &= Execution.Container.SelectTabCoefficientsOverview();
            isPassed &= Execution.CoefficientsOverview.CompareCoefficients("0.01", StringToStringArrayConverter.Run(expectedCoefficients));
            isPassed &= Execution.Container.SelectTabLiquidProperties();

            Log.Info(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Please have a look at the screenshot to verify Concentration Table Validity");
            if (isPassed)
            {
                Log.Success(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CalculateCoefficients passed.");
            }
            else
            {
                Log.Failure(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CalculateCoefficients failed.");
                Log.Screenshot();
            }

            TearDown();
            return(isPassed);
        }
Exemplo n.º 3
0
        public static bool Run(string inputValues)
        {
            StartUp();

            /* Add your TestFramework calls here, for example:
             * EH.PCPS.TestAutomation.CommonHostApplicationLayerLoader.CommonFlows.OpenHostApplication.Run(pathToApplication);
             * EH.PCPS.TestAutomation.DeviceFunctionLoader.CoDIA.Parameterization.Flows.OpenModuleOnline.Run();
             */
            bool isPassed = Execution.SetTableValues.SetValues(StringToListConverter.Run(inputValues));

            if (isPassed)
            {
                Log.Success(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_SetTableValue passed.");
            }
            else
            {
                Log.Failure(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_SetTableValue failed.");
            }

            TearDown();
            return(isPassed);
        }
        public static bool Run()
        {
            // TC_CheckFineTuningGuiBehaviour
            // Set Calculation Base to Fine Tuning
            // Read Coefficients from Device
            //  Check user notification for success
            // Select Tab Coefficients Overview
            //  Check Coefficients from Device for != nan
            // Select Tab Liquid Properties
            //  Check control Recalculate for enabled state = false
            // Enter values into table
            //  Check control Recalculate for enabled state = true
            // Recalculate Coefficients
            //  Check user notification for success
            // Select Tab Coefficients Overview
            //  Check calculated Coefficients for != nan
            const string Description = "Description of TC_CheckFineTuningGuiBehaviour: \r\n " +
                                       "-------------------------------------------------- \r\n " +
                                       "- Set Calculation Base to Fine Tuning \r\n " +
                                       "- Read Coefficients from Device \r\n " +
                                       "-> Check user notification for success \r\n " +
                                       "- Select Tab Coefficients Overview \r\n " +
                                       "-> Check Coefficients from Device for != nan \r\n " +
                                       "- Select Tab Liquid Properties \r\n " +
                                       "->  Check control Recalculate for enabled state = false \r\n " +
                                       "- Enter values into table \r\n " +
                                       "->  Check control Recalculate for enabled state = true \r\n " +
                                       "- Recalculate Coefficients \r\n " +
                                       "->  Check user notification for success \r\n " +
                                       "- Select Tab Coefficients Overview \r\n " +
                                       "->  Check calculated Coefficients for != nan \r\n ";

            Log.Info(LogInfo.Namespace(MethodBase.GetCurrentMethod()), Description);

            StartUp();

            /* Add your TestFramework calls here, for example:
             * EH.PCPS.TestAutomation.CommonHostApplicationLayerLoader.CommonFlows.OpenHostApplication.Run(pathToApplication);
             * EH.PCPS.TestAutomation.DeviceFunctionLoader.CoDIA.Parameterization.Flows.OpenModuleOnline.Run();
             */

            // TC_CheckFineTuningGuiBehaviour
            // Set Calculation Base to Fine Tuning
            // Read Coefficients from Device
            //  Check user notification for success
            // Select Tab Coefficients Overview
            //  Check Coefficients from Device for != nan
            // Select Tab Liquid Properties
            //  Check control Recalculate for enabled state = false
            // Enter values into table
            //  Check control Recalculate for enabled state = true
            // Recalculate Coefficients
            //  Check user notification for success
            // Select Tab Coefficients Overview
            //  Check calculated Coefficients for != nan
            const string TableValues = "1;1;1;2;2;2;3;3;3;4;4;4;5;5;5;6;6;6;7;7;7;8;8;8;9;9;9;10;10;10;11;11;11;12;12;12";

            bool isPassed = false;

            isPassed  = AssertFunctions.AreEqual(true, Validation.CheckAvailabilityOfTabPages.IsBaseSettingsTabPageAvailable(), "Verify that Base Settings tab is active.");
            isPassed &= Execution.Container.SelectTabBaseSettings();
            isPassed &= Flows.ConfigureBaseSettings.BaseConfiguration("Fine tuning settings", string.Empty, string.Empty, string.Empty, string.Empty);
            isPassed &= Flows.Read.Run();

            // Todo:
            // isPassed &= Check user notification for success
            isPassed &= AssertFunctions.AreEqual(true, Validation.CheckAvailabilityOfTabPages.IsCoefficientOverviewTabPageAvailable(), "Verify that Coefficients Overview tab is active.");
            isPassed &= Execution.Container.SelectTabCoefficientsOverview();
            isPassed &= Execution.CoefficientsOverview.AreReadCoefficientsAvailable();
            isPassed &= AssertFunctions.AreEqual(true, Validation.CheckAvailabilityOfTabPages.IsLiquidPropertiesTabPageAvailable(), "Verify that Liquid Properties tab is active.");
            isPassed &= Execution.Container.SelectTabLiquidProperties();

            // Todo:
            // Check control Recalculate for enabled state = false
            isPassed &= Execution.SetTableValues.SetValues(StringToListConverter.Run(TableValues));

            // Todo:
            // Check control Recalculate for enabled state = true
            isPassed &= Execution.LiquidProperties.Recalculate();

            // Todo:
            // Check user notification for success
            isPassed &= AssertFunctions.AreEqual(true, Validation.CheckAvailabilityOfTabPages.IsCoefficientOverviewTabPageAvailable(), "Verify that Coefficients Overview tab is active.");
            isPassed &= Execution.Container.SelectTabCoefficientsOverview();
            isPassed &= Execution.CoefficientsOverview.AreCalculatedCoefficientsAvailable();

            if (isPassed)
            {
                Log.Success(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CheckFineTuningGuiBehaviour passed.");
            }
            else
            {
                Log.Failure(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CheckFineTuningGuiBehaviour failed.");
                Log.Screenshot();
            }

            TearDown();

            return(isPassed);
        }
Exemplo n.º 5
0
 public static bool Run(string parameterNames)
 {
     return(Run(StringToListConverter.Run(parameterNames)));
 }
 public static bool Run(string parameterToCheck)
 {
     return(Run(StringToListConverter.Run(parameterToCheck)));
 }
 public static bool Run(string pathToSilWhgParameter, string silWhgCode, string pathToDeactivateSilWhg, string pathToParameter, int timeoutForSilWhgPageToDisappear, int timeoutForNextButton)
 {
     return(Run(pathToSilWhgParameter, silWhgCode, pathToDeactivateSilWhg, StringToListConverter.Run(pathToParameter), timeoutForSilWhgPageToDisappear, timeoutForNextButton));
 }
 /// <summary>
 /// Converts a semicolon separated input string (xxxx;xxxx;xxxx xx; xxxx) to an array.
 /// </summary>
 /// <param name="input">
 /// The input string.
 /// </param>
 /// <returns>
 /// An array with the separated elements of the input string.
 /// </returns>
 public static string[] Run(string input)
 {
     return(StringToListConverter.Run(input).ToArray());
 }