Package net.mindengine.galen.runner

Examples of net.mindengine.galen.runner.GalenArguments


    private static final String[] EMPTY_TAGS = {};

    @Test(dataProvider = "provideGoodSamples")
    public void shoulParseArguments(SimpleArguments args,  GalenArguments expectedArguments) throws ParseException {
        GalenArguments realArguments = GalenArguments.parse(args.args);
        assertThat(realArguments, is(expectedArguments));
    }
View Full Code Here


        return new Object[][]{
            {args("test", "mysuite",
                            "--recursive",
                            "--htmlreport", "some.html",
                            "--testngreport", "testng.xml"),
                new GalenArguments()
                    .withAction("test")
                    .withPaths(asList("mysuite"))
                    .withRecursive(true)
                    .withHtmlReport("some.html")
                    .withTestngReport("testng.xml")
                    .withIncludedTags(EMPTY_TAGS)
                    .withExcludedTags(EMPTY_TAGS)},
                   
            {args("test", "mysuite",
                            "--htmlreport", "some.html",
                            "--testngreport", "testng.xml"),
                new GalenArguments()
                    .withAction("test")
                    .withPaths(asList("mysuite"))
                    .withRecursive(false)
                    .withHtmlReport("some.html")
                    .withTestngReport("testng.xml")
                    .withIncludedTags(EMPTY_TAGS)
                    .withExcludedTags(EMPTY_TAGS)},
                   
            {args("test", "mysuite",
                            "--htmlreport", "some.html",
                            "--testngreport", "testng.xml",
                            "--parallel-suites", "4"),
                new GalenArguments()
                    .withAction("test")
                    .withPaths(asList("mysuite"))
                    .withRecursive(false)
                    .withHtmlReport("some.html")
                    .withTestngReport("testng.xml")
                    .withIncludedTags(EMPTY_TAGS)
                    .withExcludedTags(EMPTY_TAGS)
                    .withParallelSuites(4)},
                   
            {args("test", "mysuite", "mysuite2",
                            "--recursive",
                            "--htmlreport", "some.html",
                            "--testngreport", "testng.xml"),
                new GalenArguments()
                    .withAction("test")
                    .withPaths(asList("mysuite", "mysuite2"))
                    .withRecursive(true)
                    .withHtmlReport("some.html")
                    .withTestngReport("testng.xml")
                    .withIncludedTags(EMPTY_TAGS)
                    .withExcludedTags(EMPTY_TAGS)},
                   
            {args("test", "mysuite", "mysuite2",
                            "--filter", "Some Test *"),
                new GalenArguments()
                    .withAction("test")
                    .withPaths(asList("mysuite", "mysuite2"))
                    .withRecursive(false)
                    .withFilter("Some Test *")
                    .withIncludedTags(EMPTY_TAGS)
                    .withExcludedTags(EMPTY_TAGS)},
                   
            {args("check""some.spec",
                            "--url", "http://mindengine.net",
                            "--javascript", "some.js",
                            "--include", "mobile,all",
                            "--exclude", "nomobile,testTag",
                            "--size", "400x700",
                            "--htmlreport", "some.html",
                            "--testngreport", "testng.xml"),
                new GalenArguments()
                    .withAction("check")
                    .withUrl("http://mindengine.net")
                    .withJavascript("some.js")
                    .withIncludedTags("mobile", "all")
                    .withExcludedTags("nomobile", "testTag")
                    .withScreenSize(new Dimension(400, 700))
                    .withPaths(asList("some.spec"))
                    .withHtmlReport("some.html")
                    .withTestngReport("testng.xml")},

            {args("check", "some.spec", "-u", "http://mindengine.net",
                            "-j", "some.js",
                            "-i", "mobile,all",
                            "-e", "nomobile,testTag",
                            "-s", "400x700",
                            "-h", "some.html",
                            "-g", "testng.xml"),
               new GalenArguments()
                    .withAction("check")
                    .withUrl("http://mindengine.net")
                    .withJavascript("some.js")
                    .withIncludedTags("mobile", "all")
                    .withExcludedTags("nomobile", "testTag")
                    .withScreenSize(new Dimension(400, 700))
                    .withPaths(asList("some.spec"))
                    .withHtmlReport("some.html")
                    .withTestngReport("testng.xml")},

            {args("check", "some.spec",
                            "--url", "http://mindengine.net",
                            "--include", "mobile,all",
                            "--exclude", "nomobile,testTag",
                            "--size", "400x700",
                            "--htmlreport", "some.html"),
                new GalenArguments()
                    .withAction("check")
                    .withUrl("http://mindengine.net")
                    .withIncludedTags("mobile", "all")
                    .withExcludedTags("nomobile", "testTag")
                    .withScreenSize(new Dimension(400, 700))
                    .withPaths(asList("some.spec"))
                    .withHtmlReport("some.html")},
                  
            {args("check", "some1.spec", "some2.spec", "--url", "http://mindengine.net"),
                new GalenArguments()
                    .withAction("check")
                    .withUrl("http://mindengine.net")
                    .withIncludedTags()
                    .withExcludedTags()
                    .withPaths(asList("some1.spec", "some2.spec"))},
          
            {args("config"),
                new GalenArguments()
                    .withAction("config")},

            {args("dump", "my-page.spec", "--url", "http://mindengine.net", "--export", "export-page-dir", "--max-width", "100", "--max-height", "150"),
                new GalenArguments()
                    .withAction("dump")
                    .withPaths(asList("my-page.spec"))
                    .withUrl("http://mindengine.net")
                    .withExport("export-page-dir")
                    .withMaxWidth(100)
View Full Code Here

       
        File reportsDir = Files.createTempDir();
        String htmlReportPath = reportsDir.getAbsolutePath();
        String testngReportPath = reportsDir.getAbsolutePath() + "/testng-report.html";
       
        galen.execute(new GalenArguments()
            .withAction("test")
            .withPaths(asList(getClass().getResource("/suites/to-run/suite-single.test").getFile()))
            .withHtmlReport(htmlReportPath)
            .withTestngReport(testngReportPath)
            );
View Full Code Here

        GalenMain galen = new GalenMain();
       
        File reportsDir = Files.createTempDir();
        String testngReportPath = reportsDir.getAbsolutePath() + "/testng-report.xml";
       
        galen.execute(new GalenArguments()
            .withAction("test")
            .withPaths(asList(getClass().getResource("/suites/to-run/recursive-check").getFile()))
            .withRecursive(true)
            .withTestngReport(testngReportPath)
            );
View Full Code Here

        String htmlReportPath = reportsDir.getAbsolutePath();
        String testngReportPath = reportsDir.getAbsolutePath() + "/testng-report.html";
       
        JsTestRegistry.get().clear();
       
        new GalenMain().execute(new GalenArguments()
            .withAction("test")
            .withPaths(asList(getClass().getResource("/js-tests/simple-with-error.test.js").getFile()))
            .withHtmlReport(htmlReportPath)
            .withTestngReport(testngReportPath)
        );
View Full Code Here

    }
   
    @Test public void shouldRun_javascriptTestWithEvents() throws Exception {
        JsTestRegistry.get().clear();
       
        new GalenMain().execute(new GalenArguments()
            .withAction("test")
            .withPaths(asList(getClass().getResource("/js-tests/with-events.test.js").getFile()))
        );
       
        assertThat(JsTestRegistry.get().getEvents(), contains(
View Full Code Here

    }

    @Test public void shouldRunJavascriptTests_andFilterThem() throws Exception {
        JsTestRegistry.get().clear();

        new GalenMain().execute(new GalenArguments()
                        .withAction("test")
                        .withPaths(asList(getClass().getResource("/js-tests/testfilter.test.js").getFile()))
        );

        assertThat(JsTestRegistry.get().getEvents(), contains(
View Full Code Here

        GalenMain galen = new GalenMain();
       
        File reportsDir = Files.createTempDir();
        String testngReportPath = reportsDir.getAbsolutePath() + "/testng-report.html";
       
        galen.execute(new GalenArguments()
            .withAction("test")
            .withPaths(asList(getClass().getResource("/suites/to-run/recursive-check").getFile()))
            .withRecursive(true)
            .withTestngReport(testngReportPath)
            .withParallelSuites(5)
View Full Code Here

        String pageSpec = getClass().getResource("/html/page.spec").getFile();
        File reportsDir = Files.createTempDir();
        String htmlReportPath = reportsDir.getAbsolutePath();
        String testngReportPath = reportsDir.getAbsolutePath() + "/testng-report.html";
       
        new GalenMain().execute(new GalenArguments()
            .withAction("check")
            .withUrl(testUrl)
            .withPaths(Arrays.asList(pageSpec))
            .withScreenSize(new Dimension(450, 500))
            .withHtmlReport(htmlReportPath)
View Full Code Here

        String testUrl = "file://" + getClass().getResource("/html/page-nice.html").getFile();
        String pageSpec = getClass().getResource("/negative-specs/invalid-spec.spec").getFile();
        File reportsDir = Files.createTempDir();
        String testngReportPath = reportsDir.getAbsolutePath() + "/testng-report.html";
       
        new GalenMain().execute(new GalenArguments()
            .withAction("check")
            .withUrl(testUrl)
            .withPaths(Arrays.asList(pageSpec))
            .withScreenSize(new Dimension(450, 500))
            .withTestngReport(testngReportPath)
View Full Code Here

TOP

Related Classes of net.mindengine.galen.runner.GalenArguments

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.