Ejemplo n.º 1
0
        public static void BeforeTestRun()
        {
            string dataHora = ClassUtilities.PegarDataHora();

            //var htmlReporter = new ExtentHtmlReporter(@"C:\Users\leonardo.barcellos\Desktop\Fundacred\AutomacaoFuncional\Reports\" + dataHora + " Report.html");
            //htmlReporter.Configuration().DocumentTitle = "Leonardo - Teste Extent Report";
            //htmlReporter.Configuration().Theme = Theme.Dark;
            //extent.AttachReporter(htmlReporter);
            //extent.AddSystemInfo("Automação", "Leonardo Barcellos");
            //extent.AddSystemInfo("SO", "win10");

            extent = new ExtentReports();

            //Klov reporter
            KlovReporter klov = new KlovReporter();

            // specify mongoDb connection
            klov.InitMongoDbConnection("app.fundacred.org.br", 27017);

            // specify project ! you must specify a project, other a "Default project will be used"
            klov.ProjectName = "Fundacred - Testes Automatizados";

            // you must specify a reportName otherwise a default timestamp will be used
            klov.ReportName = "Build " + DateTime.Now.ToString();

            // URL of the KLOV server
            klov.KlovUrl = "http://app.fundacred.org.br:9090";

            // finally, attach the reporter:
            extent.AttachReporter(klov);
        }
Ejemplo n.º 2
0
        public static void CreateReport()
        {
            var htmlReporter = new ExtentHtmlReporter(pathToReport + reportName + DateTime.Now.ToString("dd-MM-yyyy") + ".html");
            var KlovManager  = ConfigurationManager.AppSettings["EnableKlov"];

            // create ExtentReports and attach reporter(s)
            extent = new ExtentReports();

            if (KlovManager == "True")
            {
                klov = new KlovReporter();

                var klovUrlConnection  = ConfigurationManager.AppSettings["klovUrl"];
                var klovPortConnection = ConfigurationManager.AppSettings["klovPort"];
                var klovProjectName    = NunitTestHelper.GetProjectName();
                var KlovManagerUrl     = ConfigurationManager.AppSettings["KlovManagerUrl"];

                klov.InitMongoDbConnection(klovUrlConnection, int.Parse(klovPortConnection));

                klov.ProjectName = NunitTestHelper.GetProjectName();

                klov.KlovUrl = KlovManagerUrl;

                klov.ReportName = "Build " + DateTime.Now.ToString();
                extent.AttachReporter(htmlReporter, klov);
            }
            else
            {
                extent.AttachReporter(htmlReporter);
            }


            //extent.AttachReporter(htmlReporter);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Method automatically used on the start of the test suite to initialize the report
        /// </summary>
        /// <param name="reportName"></param>
        public void InitializeReport(string reportName)
        {
            if (ExtentWrapper == null)
            {
                ExtentWrapper = new ExtentReports();
                bool reportIsKlov = false;
                try
                {
                    reportIsKlov = ConfigurationManager.AppSettings["REPORT_IS_KLOV"].Equals("1");
                    if (reportIsKlov)
                    {
                        var klovReporter = new KlovReporter();

                        // specify mongoDb connection
                        klovReporter.InitMongoDbConnection("localhost", 27017);

                        // specify project ! you must specify a project, other a "Default project will be used"
                        klovReporter.ProjectName = reportName;

                        // you must specify a reportName otherwise a default timestamp will be used
                        klovReporter.ReportName =
                            ConfigurationManager.AppSettings["REPORT_DOCUMENT_TITLE"] + " - " +
                            ConfigurationManager.AppSettings["REPORT_NAME"];

                        // URL of the KLOV server
                        klovReporter.KlovUrl = "http://localhost";

                        ExtentWrapper.AttachReporter(klovReporter);
                    }
                    else
                    {
                        string reportPath = ConfigurationManager.AppSettings["REPORT_FILE_PATH"];

                        System.IO.Directory.CreateDirectory(reportPath);

                        string reportFullPath = String.Format(reportPath + @"{0}.html", reportName + " - Automated Tests - Execution Date Time " + DateTime.Now.ToString("dd-MM-yyyyTHH-mm-ss"));

                        Html = new ExtentHtmlReporter(reportFullPath);
                        Html.Configuration().FilePath              = reportFullPath;
                        Html.Configuration().DocumentTitle         = ConfigurationManager.AppSettings["REPORT_DOCUMENT_TITLE"];
                        Html.Configuration().ReportName            = ConfigurationManager.AppSettings["REPORT_NAME"];
                        Html.Configuration().ChartVisibilityOnOpen = true;
                        Html.Configuration().ChartLocation         = ChartLocation.Top;

                        ExtentWrapper.AttachReporter(Html);
                    }
                }
                catch (ConfigurationErrorsException)
                {
                }
            }
        }
        public static void InitializeReport()
        {
            var htmlReporter = new ExtentHtmlReporter(@"C:\shwetha\TbgAutoFramework_Shwetha_Trial\Tbg.Taxback.Automation.Web.Test\ExtentReport.html");

            htmlReporter.Configuration().Theme = AventStack.ExtentReports.Reporter.Configuration.Theme.Dark;

            extent = new ExtentReports();
            klov   = new KlovReporter();

            klov.InitMongoDbConnection("Localhost", 27017);
            klov.KlovUrl     = "http://localhost:5689s";
            klov.ProjectName = "BuyPlanAutomation Test";

            klov.ReportName = "Shwetha" + DateTime.Now.ToString();

            extent.AttachReporter(htmlReporter);
        }
Ejemplo n.º 5
0
        public static void InitializeReport()
        {
            if (ConfigurationManager.AppSettings["Klov"].ToString() == "true")
            {
                var htmlReporter = new ExtentHtmlReporter(@"C:\Users\sayoan.oliveira\Documents\SpecFlowBasicSolAluno\SpecFlow.Basic\Logs\extendReport.html");

                extent = new ExtentReports();

                klov = new KlovReporter();
                klov.InitMongoDbConnection("ABHNTBNSI2964", 27017);
                klov.ProjectName = "SpecFlow Test";

                klov.KlovUrl    = "http://abhntbnsi2964:899";
                klov.ReportName = "Base2 SpecFlow" + DateTime.Now.ToString();

                extent.AttachReporter(htmlReporter, klov);
            }
        }
Ejemplo n.º 6
0
        public static void InitializeReport()
        {
            //Initialize Extent report before test starts
            var htmlReporter = new ExtentHtmlReporter(@"C:\Users\sayed.hasni\source\repos\SpecFlowFirst\SpecFlow2\ExtentReport.html");

            htmlReporter.Configuration().Theme = AventStack.ExtentReports.Reporter.Configuration.Theme.Dark;
            //Attach report to reporter
            extent = new ExtentReports();
            klov   = new KlovReporter();

            klov.InitMongoDbConnection("localhost", 27017);

            klov.ProjectName = "ExecuteAutomation Test";

            // URL of the KLOV server
            klov.KlovUrl = "http://localhost:5689";

            klov.ReportName = "Karthik KK" + DateTime.Now.ToString();


            extent.AttachReporter(htmlReporter, klov);
        }
Ejemplo n.º 7
0
        }//fim void

        public void gravarRelatorioKlov(string aux)
        {
            if (aux.Equals("true"))
            {
                //Objeto Klov
                var klovReporter = new KlovReporter();

                //Conexão DB Mongo
                klovReporter.InitMongoDbConnection(ConfigurationManager.AppSettings["servidorMongoDB"].ToString(), 27017);

                // Nome Projeto
                klovReporter.ProjectName = ConfigurationManager.AppSettings["nomeProjeto"].ToString();

                // Nome Report - pode indicar a branch e horário
                klovReporter.ReportName = ConfigurationManager.AppSettings["urlBranch"].ToString() + " " + DateTime.Now.ToString();

                // URL do servidor
                klovReporter.KlovUrl = "http://" + ConfigurationManager.AppSettings["servidorMongoDB"].ToString();

                report.AttachReporter(klovReporter);
            } //fim if
        }     //fim void