コード例 #1
0
    protected static void InitializeSummaryReport()
    {
        frameworkParameters.RunConfiguration = ConfigurationManager.AppSettings["RunConfiguration"];
        _timeStamp = TimeStamp.GetInstance();
        InitializeReportSettings();
        ReportTheme reportTheme =
            ReportThemeFactory.GetReportsTheme((Framework_Reporting.ReportThemeFactory.Theme)Enum.Parse(typeof(Framework_Reporting.ReportThemeFactory.Theme), ConfigurationManager.AppSettings["ReportTheme"]));

        report = new SeleniumReport(_reportSettings, reportTheme);
        report.InitializeReportTypes();
        report.InitializeResultSummary();
        report.WorkItemUrl = ConfigurationManager.AppSettings["WorkItemURL"];
        CreateResultSummaryHeader();
    }
        private void InitializeChart(Chart tChart)
        {
            tChart.Panel.Transparent      = false;
            tChart.Header.Visible         = false;
            tChart.Axes.Left.Grid.Visible = true;
            tChart.Aspect.View3D          = false;
            tChart.Legend.Visible         = false;

            ReportTheme theme = new ReportTheme(tChart.Chart);

            Steema.TeeChart.Themes.Theme.ApplyChartTheme(theme, tChart.Chart);
            Steema.TeeChart.Themes.ColorPalettes.ApplyPalette(tChart.Chart, Theme.OnBlackPalette);

            Color drawPenColor1 = Color.Black;

            //backImage.Opacity = 30;
            tChart.Walls.Back.Transparency   = 40;
            tChart.Walls.Left.Transparency   = 40;
            tChart.Walls.Bottom.Transparency = 40;
            //}
            //else
            //{
            //  drawPenColor1 = Colors.Black;
            //  tChart.Walls.Back.Transparency = 95;
            //  tChart.Walls.Left.Transparency = 95;
            //  tChart.Walls.Bottom.Transparency = 95;
            //  Uri uri = new Uri("Images/teeWPbackNeg.png", UriKind.Relative);
            //  ImageSource imgSource = new System.Windows.Media.Imaging.BitmapImage(uri);
            //  backImage.ImageSource = imgSource;
            //  backImage.Opacity = 30;
            //}

            tChart.Chart.Axes.Left.Labels.Font.Color   = drawPenColor1;
            tChart.Chart.Axes.Top.Labels.Font.Color    = drawPenColor1;
            tChart.Chart.Axes.Right.Labels.Font.Color  = drawPenColor1;
            tChart.Chart.Axes.Bottom.Labels.Font.Color = drawPenColor1;
            tChart.Axes.Left.Title.Font.Color          = drawPenColor1;
            tChart.Axes.Bottom.Title.Font.Color        = drawPenColor1;

            tChart.Axes.Left.Title.Font.Size = 18;
            tChart.Axes.Left.Title.Font.Size = 18;

            tChart.Axes.Left.Labels.Font.Size   = 14;
            tChart.Axes.Bottom.Labels.Font.Size = 14;

            tChart.Chart.Legend.Font.Color = drawPenColor1;
        }
コード例 #3
0
ファイル: DriverScript.cs プロジェクト: carolwu53/carol_repo
        private void InitializeTestReport()
        {
            _frameworkParameters.RunConfiguration = ConfigurationManager.AppSettings["RunConfiguration"];
            _timeStamp = TimeStamp.GetInstance();

            InitializeReportSettings();

            string      theme       = ConfigurationManager.AppSettings["ReportTheme"];
            ReportTheme reportTheme =
                ReportThemeFactory.GetReportsTheme((Framework_Reporting.ReportThemeFactory.Theme)Enum.Parse(typeof(Framework_Reporting.ReportThemeFactory.Theme), theme));

            report = new SeleniumReport(_reportSettings, reportTheme);

            report.InitializeReportTypes();
            report.Driver = _driver;

            report.InitializeTestLog();
            report.AddTestLogHeading(_reportSettings.ProjectName +
                                     " - " + _reportSettings.ReportName +
                                     " Automation Execution Results");
            report.AddTestLogSubHeading("Date & Time",
                                        ": " + Util.GetCurrentFormattedTime(ConfigurationManager.AppSettings["DateFormatString"]),
                                        "Iteration Mode", ": " + testParameters.IterationMode);
            report.AddTestLogSubHeading("Start Iteration", ": " + testParameters.StartIteration,
                                        "End Iteration", ": " + testParameters.EndIteration);

            if (_gridMode.Equals("on", StringComparison.CurrentCultureIgnoreCase))
            {
                report.AddTestLogSubHeading("Browser", ": " + testParameters.Browser,
                                            "Version", ": " + testParameters.BrowserVersion);
                report.AddTestLogSubHeading("Platform", ": " + testParameters.Platform.ToString(),
                                            "Application URL", ": " + ConfigurationManager.AppSettings["ApplicationUrl"]);
            }
            else
            {
                report.AddTestLogSubHeading("Browser", ": " + testParameters.Browser,
                                            "Application URL", ": " + ConfigurationManager.AppSettings["ApplicationUrl"]);
            }

            report.AddTestLogTableHeadings();
        }
コード例 #4
0
        private static void InitializeSummaryReport()
        {
            _frameworkParameters.RunConfiguration = ConfigurationManager.AppSettings["RunConfiguration"];
            _timeStamp = TimeStamp.getInstance();

            _reportSettings = InitializeReportSettings();
            string      theme       = ConfigurationManager.AppSettings["ReportTheme"];
            ReportTheme reportTheme =
                ReportThemeFactory.GetReportsTheme((Framework_Reporting.ReportThemeFactory.Theme)Enum.Parse(typeof(Framework_Reporting.ReportThemeFactory.Theme), theme));

            _report = new SeleniumReport(_reportSettings, reportTheme);

            _report.InitializeReportTypes();

            _report.InitializeResultSummary();
            _report.AddResultSummaryHeading(_reportSettings.ProjectName +
                                            " - " + " Automation Execution Result Summary");
            _report.AddResultSummarySubHeading("Date & Time",
                                               ": " + Util.GetCurrentFormattedTime(ConfigurationManager.AppSettings["DateFormatString"]),
                                               "OnError", ": " + ConfigurationManager.AppSettings["OnError"]);

            _report.AddResultSummaryTableHeadings();
        }
コード例 #5
0
 /// <summary>
 ///Constructor to initialize the Report
 /// </summary>
 /// <param name="reportSettings">The ReportSettings object</param>
 /// <param name="reportTheme">The ReportTheme object</param>
 public SeleniumReport(ReportSettings reportSettings, ReportTheme reportTheme) : base(reportSettings, reportTheme)
 {
 }
コード例 #6
0
        public ChartToolsPage(Type toolsType)
        {
            chart.HeightRequest = 300;
            chart.WidthRequest  = 300;

            ToolsGalleryDemos toolsDemos = new ToolsGalleryDemos(chart.Chart, typeof(TeeChartTheme));

            chart.Chart.Aspect.View3D          = false;
            chart.Chart.Panel.Bevel.Inner      = BevelStyles.None;
            chart.Chart.Panel.Bevel.Outer      = BevelStyles.None;
            chart.Chart.Panel.Gradient.Visible = true;

            chart.Chart.Zoom.Active = false;
            chart.Chart.Touch.Style = Steema.TeeChart.TouchStyle.InChart;

            toolsDemos.CreateGallery(toolsType);

            ReportTheme theme = new ReportTheme(chart.Chart);

            Steema.TeeChart.Themes.Theme.ApplyChartTheme(theme, chart.Chart);
            Steema.TeeChart.Themes.ColorPalettes.ApplyPalette(chart.Chart, Theme.OnBlackPalette);
            chart.Chart.Header.Font.Color             = Color.Gray;
            chart.Chart.Axes.Left.AxisPen.Color       = Color.Gray;
            chart.Chart.Axes.Bottom.AxisPen.Color     = Color.Gray;
            chart.Chart.Axes.Left.Labels.Font.Color   = Color.Gray;
            chart.Chart.Axes.Bottom.Labels.Font.Color = Color.Gray;

            if (chart.Chart.Series.Count > 0)
            {
                if (chart.Chart.Series[0] is Steema.TeeChart.Styles.Pie)
                {
                    Steema.TeeChart.Styles.Pie pie = ((Steema.TeeChart.Styles.Pie)(chart.Chart.Series[0]));
                    pie.Circled = true;
                    pie.CircleGradient.Visible = false;
                }
            }

            if (chart.Chart.Tools.Count > 0)
            {
                foreach (Steema.TeeChart.Tools.Tool s in chart.Chart.Tools)
                {
                    if (s is Steema.TeeChart.Tools.Annotation)
                    {
                        Steema.TeeChart.Tools.Annotation annotation = ((Steema.TeeChart.Tools.Annotation)(s));
                        annotation.Shape.Font.Size           = 12;
                        annotation.TextAlign                 = TextAlignment.Center;
                        annotation.Shape.Gradient.StartColor = Color.FromRgb(120, 120, 120);
                    }
                    if (s is Steema.TeeChart.Tools.GridBand)
                    {
                        Steema.TeeChart.Tools.GridBand gridband = ((Steema.TeeChart.Tools.GridBand)(s));
                        gridband.Band1.Color = Color.FromRgb(192, 192, 192);
                        gridband.Band2.Color = Color.FromRgb(225, 225, 225);
                        chart.Chart.Axes.Left.Labels.RoundFirstLabel = true;
                        chart.Chart.Axes.Left.Labels.Separation      = 100;
                    }
                }
            }
            chart.InvalidateDisplay();
            chart.Chart.Invalidate();

            Content = new StackLayout
            {
                Children =
                {
                    chart
                },
                VerticalOptions   = LayoutOptions.CenterAndExpand,
                HorizontalOptions = LayoutOptions.CenterAndExpand,
            };
        }
        public ChartStylesPage(Type seriesType)
        {
            chart.WidthRequest  = 400;
            chart.HeightRequest = 300;
            chart.Chart.Series.Add(Series.NewFromType(seriesType));

            chart.Chart.Aspect.View3D = false;

            chart.Chart.Panel.Bevel.Inner      = BevelStyles.None;
            chart.Chart.Panel.Bevel.Outer      = BevelStyles.None;
            chart.Chart.Panel.Gradient.Visible = true;

            chart.Chart.Zoom.Active    = true;
            chart.Chart.Panning.Active = true;
            chart.Chart.Touch.Style    = Steema.TeeChart.TouchStyle.InChart;

            ReportTheme theme = new ReportTheme(chart.Chart);

            Steema.TeeChart.Themes.Theme.ApplyChartTheme(theme, chart.Chart);
            Steema.TeeChart.Themes.ColorPalettes.ApplyPalette(chart.Chart, Theme.SeawashPalette);
            chart.Chart.CurrentTheme = Steema.TeeChart.ThemeType.Report;

            chart.Chart.Header.Font.Size             = 14;
            chart.Chart.Header.Font.Color            = Color.Gray;
            chart.Chart.Axes.Bottom.Labels.Font.Size = 12;
            chart.Chart.Axes.Left.Labels.Font.Size   = 12;
            chart.Chart.Legend.Font.Size             = 10;
            chart.Chart.Axes.Bottom.AxisPen.Visible  = true;
            chart.Chart.Axes.Left.AxisPen.Visible    = true;
            chart.Chart.Axes.Left.AxisPen.Color      = Color.Gray;
            chart.Chart.Axes.Bottom.AxisPen.Color    = Color.Gray;
            chart.Chart.Axes.Bottom.AxisPen.Width    = 1;
            chart.Chart.Axes.Left.AxisPen.Width      = 1;
            chart.Chart.Legend.Visible = false;
            chart.Chart.Axes.Left.Labels.Font.Color   = Color.Gray;
            chart.Chart.Axes.Bottom.Labels.Font.Color = Color.Gray;

            foreach (var item in chart.Chart.Series)
            {
                item.FillSampleValues();
            }

            chart.Chart.Header.Text = chart.Chart[0].Description;

            if (seriesType != null && seriesType.GetTypeInfo().IsSubclassOf(typeof(Custom3D)) && seriesType != typeof(TagCloud) &&
                seriesType != typeof(Ternary) && seriesType != typeof(World))
            {
                chart.Chart.Aspect.View3D            = true;
                chart.Chart.Axes.Left.Grid.Visible   = false;
                chart.Chart.Axes.Bottom.Grid.Visible = false;
                chart.Chart.Aspect.Chart3DPercent    = 30;
            }

            Variables.ModifySeries(chart.Chart, Color.White);

            Content = new StackLayout
            {
                Children =
                {
                    chart,
                },
                VerticalOptions   = LayoutOptions.CenterAndExpand,
                HorizontalOptions = LayoutOptions.CenterAndExpand,
            };
        }