Exemplo n.º 1
0
        public void RunFlowAndCreateReport()
        {
            //Arrange
            BusinessFlow mBF = new BusinessFlow();

            mBF.Activities = new ObservableList <Activity>();
            mBF.Name       = "BF TEst timeline events listener";
            mBF.Active     = true;
            Activity activitiy1 = new Activity()
            {
                Active = true
            };

            activitiy1.Active = true;
            mBF.Activities.Add(activitiy1);
            ActDummy action1 = new ActDummy()
            {
                Description = "Dummay action 1", Active = true
            };

            activitiy1.Acts.Add(action1);
            mGingerRunner.Executor.BusinessFlows.Add(mBF);
            RunListenerBase.Start();
            mGingerRunner.Executor.RunBusinessFlow(mBF);

            //Act
            NewHTMLReport newHTMLReport = new NewHTMLReport();
            ReportInfo    reportInfo    = new ReportInfo("aaa"); // !!!!!!!!!!!!!!!
            string        s             = newHTMLReport.CreateReport(reportInfo);


            //Assert
            // Assert.AreEqual(1, events.Count, "Events count");
        }
Exemplo n.º 2
0
        public void CreateReportFromFolder()
        {
            // Arrange
            string folder = TestResources.GetTestResourcesFolder("Reports" + Path.DirectorySeparatorChar + "AutomationTab_LastExecution");

            //Act
            ReportInfo    reportInfo = new ReportInfo(folder);
            NewHTMLReport rep        = new NewHTMLReport();
            string        s          = rep.CreateReport(reportInfo);



            // TODO: need to create same report like HTMLDetailedReport

            // System.IO.File.WriteAllText(@"c:\temp\rep1.html", s);


            //HTMLDetailedReport hTMLDetailedReport = new HTMLDetailedReport();

            //HTMLReportConfiguration hTMLReportConfiguration = new HTMLReportConfiguration();
            //hTMLReportConfiguration.RunSetFieldsToSelect = HTMLReportConfiguration.GetReportLevelMembers(typeof(RunSetReport));
            //hTMLReportConfiguration.EmailSummaryViewFieldsToSelect = HTMLReportConfiguration.GetReportLevelMembers(typeof(RunSetReport));
            //hTMLReportConfiguration.GingerRunnerFieldsToSelect = HTMLReportConfiguration.GetReportLevelMembers(typeof(GingerReport));
            //hTMLReportConfiguration.BusinessFlowFieldsToSelect = HTMLReportConfiguration.GetReportLevelMembers(typeof(BusinessFlowReport));
            //hTMLReportConfiguration.ActivityGroupFieldsToSelect = HTMLReportConfiguration.GetReportLevelMembers(typeof(ActivityGroupReport));
            //hTMLReportConfiguration.ActivityFieldsToSelect = HTMLReportConfiguration.GetReportLevelMembers(typeof(ActivityReport));
            //hTMLReportConfiguration.ActionFieldsToSelect = HTMLReportConfiguration.GetReportLevelMembers(typeof(ActionReport));


            //GingerExecutionReport gingerExecutionReport = new GingerExecutionReport();
            //gingerExecutionReport.TemplatesFolder = @"C:\Users\yaronwe\source\repos\Ginger\Ginger\Ginger\Reports\GingerExecutionReport\";
            //gingerExecutionReport.HTMLReportMainFolder = @"c:\temp\rep1";
            //gingerExecutionReport.CreateSummaryViewReport(reportInfo);
            // gingerExecutionReport.CreateSummaryViewReport( .CreateBusinessFlowLevelReport(reportInfo);

            // string s = ExtensionMethods.CreateSummaryViewReport( .CreateGingerExecutionReport(reportInfo, true);
            // string s = hTMLDetailedReport.CreateReport(reportInfo);
            //System.IO.File.WriteAllText(@"c:\temp\rep1.html", s);

            // gingerExecutionReport.cre .CreateGingerExecutionReport()
            //HTMLSummaryReport
        }