Exemple #1
0
        private static ARobot SelectByLangId(CmdDriver cmd, string langId, string RunFolder)
        {
            switch (langId)
            {
            case ".java": return(new RobotJava(cmd, RunFolder,
                                               Properties.Settings.Default.RobotJavaJavacExe,
                                               Properties.Settings.Default.RobotJavaJavaExe,
                                               Properties.Settings.Default.RobotJavaDenyWords));

            case ".cs":
                return(new RobotSharp(cmd, RunFolder,
                                      Properties.Settings.Default.RobotSharpCscExe,
                                      Properties.Settings.Default.RobotSharpDenyWords));

            case ".cpp":
                return(new RobotCpp(cmd, RunFolder,
                                    Properties.Settings.Default.RobotCppGccExe,
                                    Properties.Settings.Default.RobotCppDenyWords));

            case ".pas":
                return(new RobotPascal(cmd, RunFolder,
                                       Properties.Settings.Default.RobotPascalFpcExe,
                                       Properties.Settings.Default.RobotPascalDenyWords));

            default: return(new RobotNull(cmd));
            }
        }
Exemple #2
0
        public Tester(string runkey, string WorkFolder)
        {
            RunFolder = WorkFolder + runkey + "\\";
            CmdDriver cmd = new CmdDriver(RunFolder, Properties.Settings.Default.RobotRunTestTimeout);

            Robot = RobotFactory.Create(cmd, runkey, RunFolder);
        }
Exemple #3
0
        //========================================================================================
        // OpenSQLTraceReport()
        //========================================================================================

        public void OpenSQLTraceReport()
        {
            IsSaved = true;
            SetTitle();
            editorView.IsExecutable = false;

            // catch up on Windows messages just to look better
            Application.DoEvents();

            string sql =
                "select P.tracefile from v$process P, v$session S"
                + " where S.audsid = userenv('sessionid') and S.paddr = P.addr";

            string trcpath = dbase.LookupQuickInfo(sql);
            string repfile = System.IO.Path.Combine(
                System.IO.Path.GetTempPath(), System.IO.Path.GetRandomFileName());

            string cmd = System.IO.Path.Combine(DatabaseSetup.OracleHome, @"bin\tkprof.exe");

            var driver = new CmdDriver();

            driver.Run(cmd, trcpath, repfile);

            LoadFile(repfile);
        }
Exemple #4
0
 public ARobot(CmdDriver cmd, string RunFolder, string SourceFile, string ExecFile, string DenyWords)
 {
     this.cmd        = cmd;
     this.RunFolder  = RunFolder;
     this.SourceFile = SourceFile;
     this.ExecFile   = ExecFile;
     this.DenyWords  = DenyWords;
 }
 public RobotPascal(CmdDriver cmd, string RunFolder, string FpcExe, string DenyWords)
     : base(cmd, RunFolder,
            "Program.pas",
            "Program.exe",
            DenyWords)
 {
     this.FpcExe = FpcExe;
 }
Exemple #6
0
 public RobotSharp(CmdDriver cmd, string RunFolder, string CscExe, string DenyWords)
     : base(cmd, RunFolder,
            "Program.cs",
            "Program.exe",
            DenyWords)
 {
     this.CscExe = CscExe;
 }
Exemple #7
0
 public RobotCpp(CmdDriver cmd, string RunFolder, string GccExe, string DenyWords)
     : base(cmd, RunFolder,
            "Program.cpp",
            "Program.exe",
            DenyWords)
 {
     this.GccExe = GccExe;
 }
Exemple #8
0
 public RobotJava(CmdDriver cmd, string RunFolder, string JavacExe, string JavaExe, string DenyWords)
     : base(cmd, RunFolder,
            "Program.java",
            "Program.class",
            DenyWords)
 {
     this.JavacExe = JavacExe;
     this.JavaExe  = JavaExe;
 }
        public void CheckErrorMessageForInvalidCoupon()
        {
            yourOrderPage = new YourOrderPage(CmdDriver.Driver);

            extentReportUtils.createATestCase("Check error message for an invalid coupon");
            extentReportUtils.addTestLog(Status.Info, "CheckErrorMessageForInvalidCoupon");
            CmdDriver.NavigateTo("https://store.progress.com/configure-purchase?skuId=6127");

            yourOrderPage.ClickAcceptAllCookies();

            // Set coupon
            yourOrderPage.SetCoupon("TestDiscount20");

            // Assert error message
            Assert.AreEqual("Coupon code is not valid.", yourOrderPage.GetCouponErrorMessageText());
        }
        public void VerifySavingsLabelsAreNotDisplayedWhenQuantitiesAreWithDefaultValues()
        {
            yourOrderPage = new YourOrderPage(CmdDriver.Driver);

            extentReportUtils.createATestCase("Verify savings labels are not displayed when quantities are with default values");
            extentReportUtils.addTestLog(Status.Info, "VerifySavingsLabelsAreNotDisplayedWhenQuantityAreWithDefaultValues");
            CmdDriver.NavigateTo("https://store.progress.com/configure-purchase?skuId=6127");

            yourOrderPage.ClickAcceptAllCookies();

            // Assert default License quantity value
            Assert.AreEqual(1, yourOrderPage.GetSelectedLicenceQuantityValue());

            // Assert default Maintenance & Support quantity value
            Assert.AreEqual(HelperUtils.GetDescription(YearQuantity.ONE_YEAR), yourOrderPage.GetSelectedMaintenanceAndSupportQuantityValue());

            // Assert Savings Label is NOT displayed under Unit Price
            Assert.IsFalse(yourOrderPage.IsSavingsLabelForUnitPriceDisplayed());

            // Assert Savings Label is NOT displayed under Yearly Price
            Assert.IsFalse(yourOrderPage.IsSavingsLabelForYearlyPriceDisplayed());
        }
        public void CheckTotalAndSubtotalValuesWhenThereIsADiscountOnlyForYearly()
        {
            yourOrderPage = new YourOrderPage(CmdDriver.Driver);

            extentReportUtils.createATestCase("Check total and subtotal values when there are discounts for both licenses and yearly dropdowns");
            extentReportUtils.addTestLog(Status.Info, "CheckTotalAndSubtotalValuesWhenThereAreDiscountsForBothLicensesAndYearlyDropDowns");
            CmdDriver.NavigateTo("https://store.progress.com/configure-purchase?skuId=6127");

            yourOrderPage.ClickAcceptAllCookies();

            Product product = new Product(ProductType.ONLY_YEARLY_DISCOUNT);

            product.LicenseQuantity = 1;
            product.MinYearlyQty    = 2;

            // Set Unit Price and M & S subscription price
            product.InitialUnitPrice     = yourOrderPage.GetUnitPrice();
            product.MNsSubscriptionPrice = yourOrderPage.GetMnSSubscriptionPrice();

            // Assert Savings Label is NOT displayed under Unit Price
            Assert.IsFalse(yourOrderPage.IsSavingsLabelForUnitPriceDisplayed());

            // Set Yearly quantity
            int randomYearQuantity = yourOrderPage.GetRandomYearQuantityWithMinValue(product.MinYearlyQty);

            product.YearlyQuantity = randomYearQuantity;
            product.YearlyDiscount = yourOrderPage.GetYearQuantityDiscounts(randomYearQuantity);
            yourOrderPage.SetMaintenanceAndSupportQuantity(product.YearlyQuantity);

            // Calculations
            product.CalculateValues();

            // Assert actual and expected unit price
            double actualUnitPrice = yourOrderPage.GetUnitPrice();

            Assert.AreEqual(product.UnitPrice, actualUnitPrice);

            // Assert actual and expected yearly price
            double actualYearlyPrice = yourOrderPage.GetYearlyQuantityValue();

            Assert.AreEqual(product.ExpectedYearlyPrice, actualYearlyPrice);

            // Check discount
            double actualDiscountForYear = yourOrderPage.GetSavingsLabelForYearlyPrice();

            Assert.AreEqual(product.DiscountForYear, actualDiscountForYear);

            // Assert subtotal value
            double actualSubtotal = yourOrderPage.GetSubtotalValue();

            Assert.AreEqual(product.SubtotalValue, actualSubtotal);

            // Assert renewal price
            double actualRenewalPrice = yourOrderPage.GetMnSSubscriptionPrice();

            Assert.AreEqual(product.ExpectedRenewalPrice, actualRenewalPrice);

            // Assert total Maintenance price
            double actualMaintenancePrice = yourOrderPage.GetTotalMaintenancePrice();

            Assert.AreEqual(product.ExpectedMaintenancePrice, actualMaintenancePrice);

            // Assert total discounts
            double actualTotalDiscounts = yourOrderPage.GetTotalDiscounts();

            Assert.AreEqual(product.ExpectedTotalDiscounts, actualTotalDiscounts);

            // Assert Total value
            double actualTotalValue = yourOrderPage.GetTotalValue();

            Assert.AreEqual(product.ExpectedTotalValue, actualTotalValue);

            // Assert Subtotal and Total value
            Assert.AreEqual(product.SubtotalValue, product.ExpectedTotalValue);
        }
Exemple #12
0
 public static ARobot Create(CmdDriver cmd, string runkey, string RunFolder)
 {
     return(SelectByLangId(cmd, Path.GetExtension(runkey), RunFolder));
 }
Exemple #13
0
 public RobotNull(CmdDriver cmd) : base(cmd, "", "", "", "")
 {
 }