diff --git a/.gitignore b/.gitignore index 88eb7f4..33df35d 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,8 @@ javascript/reports/* javascript/node/*.log javascript/node/dist/ javascript/node/node_modules/ +javascript/grunt/node_modules/ +javascript/gulp/node_modules/ ## IDEA .idea/* diff --git a/javascript/README.MD b/javascript/README.MD index 51a7cb5..92b4069 100644 --- a/javascript/README.MD +++ b/javascript/README.MD @@ -12,7 +12,7 @@ A showcase of JavaScript + Galen usage -Jenkins Sample Build: [![Build Status](https://martinreinhardt-online.de/jenkins/buildStatus/icon?job=Galen_sample_JavaScript)](https://martinreinhardt-online.de/jenkins/view/Galen/job/Galen_sample_JavaScript/) +Jenkins Sample Build: [![Build Status](https://martinreinhardt-online.de/jenkins/buildStatus/icon?job=Galen/Galen_sample_JavaScript)](https://martinreinhardt-online.de/jenkins/job/Galen/job/Galen_sample_JavaScript/) The sample script [runCI.sh](runCI.sh) just wrap up some calls for CI build within Jenkins: diff --git a/javascript/gulp/Gulpfile.js b/javascript/gulp/Gulpfile.js index 4f39695..a3ae1c6 100644 --- a/javascript/gulp/Gulpfile.js +++ b/javascript/gulp/Gulpfile.js @@ -2,7 +2,7 @@ var gulp = require('gulp'), gulpGalen = require('gulp-galenframework'); gulp.task("test:galen", function (done) { - gulp.src('test/specs/**/google_success*.gspec').pipe(gulpGalen.check({ + gulp.src('test/specs/**/google*.gspec').pipe(gulpGalen.check({ url: 'https://www.google.com', cwd: 'test/galen/', size: '1280x800' diff --git a/javascript/runCI.sh b/javascript/runCI.sh index 0c443b5..76a38d3 100755 --- a/javascript/runCI.sh +++ b/javascript/runCI.sh @@ -7,7 +7,6 @@ cd testSuite cd bootstrap galen test basic.test -DwebsiteUrl=${websiteUrl} --htmlreport ../../reports/bootstrap/testsuite --testngreport ../../reports/bootstrap/testsuite/testng.xml -Dwebdriver.chrome.driver=/opt/dev/tools/chromedriver -galen test saucelabs.test -DwebsiteUrl=${websiteUrl} --htmlreport ../../reports/bootstrap/saucelabsTestsuite --testngreport ../../reports/bootstrap/saucelabsTestsuite/testng.xml cd ../../testRunner @@ -18,4 +17,4 @@ cd ../../gulp npm test cd ../../grunt -npm test \ No newline at end of file +npm test diff --git a/javascript/runSauceLabs.sh b/javascript/runSauceLabs.sh new file mode 100644 index 0000000..1226a71 --- /dev/null +++ b/javascript/runSauceLabs.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +currentDir=$( pwd ) +websiteUrl='http://getbootstrap.com' + +cd testSuite + +cd bootstrap +galen test saucelabs.test -DwebsiteUrl=${websiteUrl} --htmlreport ../../reports/bootstrap/saucelabsTestsuite --testngreport ../../reports/bootstrap/saucelabsTestsuite/testng.xml diff --git a/javascript/testSuite/bootstrap/basic.test b/javascript/testSuite/bootstrap/basic.test index d3546f9..1540c96 100644 --- a/javascript/testSuite/bootstrap/basic.test +++ b/javascript/testSuite/bootstrap/basic.test @@ -13,19 +13,19 @@ @@ groups home, page homepage on ${deviceName} in ${browerName} browser selenium ${browser} ${websiteUrl} ${size} - check specs/homePageLayout.spec --include "${device}" + check specs/homePageLayout.gspec --include "${device}" @@ parameterized using browsers @@ parameterized using devices @@ groups javascript, page javascript page on ${deviceName} in ${browerName} browser selenium ${browser} ${websiteUrl} ${size} - check specs/homePageLayout.spec --include "${device}" - check specs/javascriptPageLayout.spec --include "${device}" + check specs/homePageLayout.gspec --include "${device}" + check specs/javascriptPageLayout.gspec --include "${device}" @@ parameterized using browsers @@ parameterized using devices @@ groups css, page css page on ${deviceName} in ${browerName} browser selenium ${browser} ${websiteUrl} ${size} - check specs/cssPageLayout.spec --include "${tags}" \ No newline at end of file + check specs/cssPageLayout.gspec --include "${tags}" \ No newline at end of file diff --git a/javascript/testSuite/bootstrap/saucelabs.test b/javascript/testSuite/bootstrap/saucelabs.test index 3a131ae..49fa69e 100644 --- a/javascript/testSuite/bootstrap/saucelabs.test +++ b/javascript/testSuite/bootstrap/saucelabs.test @@ -1,18 +1,18 @@ -@@ set +@@ set sauceKey aff16b42-9c23-4cb6-adf7-38da9e02193a sauceUser galen_mreinhardt gridLogin ${sauceUser}:${sauceKey} gridUrl http://${gridLogin}@ondemand.saucelabs.com:80/wd/hub @@ table browsers | browserName | gridArgs | - | Safari on Mac | --browser "safari" --version 6 --dc.platform "OS X 10.8" | + | Safari on Mac | --browser "safari" --version 8 --dc.platform "OS X 10.10" | | Opera | --browser "opera" --version 12 --dc.platform "Linux" | | Firefox | --browser "firefox" --version 34 --dc.platform "Linux" | | Chrome | --browser "chrome" --version 39 --dc.platform "Linux" | | IE 11 | --browser "internet explorer" --version 11 --dc.platform "Windows 8.1" | - | Mobile Safari iOS 7.0 | --browser "Safari" --dc.deviceName "iPhone Simulator" --dc.deviceOrientation "portrait" --dc.platformName "iOS" --dc.platformVersion "7.0" --dc.appiumVersion "1.4.3" | - | Mobile Chrome Android 5.0 | --browser "Chrome" --dc.deviceName "Android Emulator" --dc.deviceOrientation "portrait" --dc.platformName "Android" --dc.platformVersion "5.0" --dc.appiumVersion "1.4.3" | + | Mobile Safari iOS 10.0 | --browser "Safari" --dc.deviceName "iPhone Simulator" --dc.deviceOrientation "portrait" --dc.platformName "iOS" --dc.platformVersion "10.2" --dc.appiumVersion "1.7.1" | + | Mobile Chrome Android 6.0 | --browser "Chrome" --dc.deviceName "Android Emulator" --dc.deviceOrientation "portrait" --dc.platformName "Android" --dc.platformVersion "6.0" --dc.appiumVersion "1.7.1" | @@ parameterized using browsers Home page on ${browserName} browser selenium grid ${gridUrl} --page ${websiteUrl} ${gridArgs} - check specs/homePageLayout.spec --include "${device}" \ No newline at end of file + check specs/homePageLayout.gspec --include "${device}" diff --git a/junit/README.md b/junit/README.md index a88dffb..f62d868 100644 --- a/junit/README.md +++ b/junit/README.md @@ -2,7 +2,7 @@ A showcase of Maven + JUnit + Galen usage -Jenkins Sample Build: [![Build Status](https://martinreinhardt-online.de/jenkins/buildStatus/icon?job=Galen/Galen_sample_JUnit)](https://martinreinhardt-online.de/jenkins/job/Galen/job/Galen_sample_JUnit/) +Jenkins Sample Build: [![Build Status](https://martinreinhardt-online.de/jenkins/buildStatus/icon?job=Galen/Galen_sample_JUnit)](https://martinreinhardt-online.de/jenkins/job/Galen/job/Galen_sample_JUnit/) ## Steps touse this sample for your own diff --git a/junit/config b/junit/config index ecf5962..826de2a 100644 --- a/junit/config +++ b/junit/config @@ -31,7 +31,7 @@ galen.browser.screenshots.fullPage = true # Default browser # ~~~~~~~~~~~~~~~~~~~~~~~~ # A browser that should be used by default in case it was not specified in galen test -galen.default.browser=firefox +galen.default.browser=chrome # Color scheme spec precision diff --git a/junit/pom.xml b/junit/pom.xml index 02f8836..9e87aea 100644 --- a/junit/pom.xml +++ b/junit/pom.xml @@ -35,6 +35,10 @@ org.apache.maven.plugins maven-surefire-plugin ${maven-surefire-plugin.version} + + 4 + true + @@ -181,10 +185,11 @@ 1.6.1 1.2.16 1.6.1 - + /opt/dev/geckodriver + /opt/dev/chromedriver 4.11 - 2.2.4 + 2.3.6 2.53.0 diff --git a/junit/src/test/java/sample/layout/CssLayoutTest.java b/junit/src/test/java/sample/layout/CssLayoutTest.java index 46f6ad2..76c16b3 100644 --- a/junit/src/test/java/sample/layout/CssLayoutTest.java +++ b/junit/src/test/java/sample/layout/CssLayoutTest.java @@ -27,7 +27,7 @@ public CssLayoutTest(TestDevice pTestDevice) { @Test public void shouldShowCorrectBaseLayout() throws Exception { - // or use verifyPage("/css","/specs/cssPageLayout.spec"); + // or use verifyPage("/css","/specs/cssPageLayout.gspec"); load("/css/#forms"); clickElement(By.xpath(NAV_FORM_BTN)); enterText(By.xpath(INPUT_EMAIL), "invalidEmail"); diff --git a/junit/src/test/java/sample/util/GalenBaseTest.java b/junit/src/test/java/sample/util/GalenBaseTest.java index a176a3b..a21ff1c 100644 --- a/junit/src/test/java/sample/util/GalenBaseTest.java +++ b/junit/src/test/java/sample/util/GalenBaseTest.java @@ -1,7 +1,7 @@ package sample.util; import com.galenframework.junit.GalenJUnitTestBase; -import com.galenframework.speclang2.pagespec.SectionFilter; +import com.galenframework.gspeclang2.pagespec.SectionFilter; import org.apache.commons.lang3.StringUtils; import org.junit.runners.Parameterized.Parameters; import org.openqa.selenium.*; diff --git a/testng/pom.xml b/testng/pom.xml index a970fd6..b7d454f 100644 --- a/testng/pom.xml +++ b/testng/pom.xml @@ -181,7 +181,7 @@ 6.8.8 - 2.2.4 + 2.3.6 2.53.0 diff --git a/testng/src/test/java/util/testng/GalenBaseTest.java b/testng/src/test/java/util/testng/GalenBaseTest.java index 4b95bab..14b290d 100644 --- a/testng/src/test/java/util/testng/GalenBaseTest.java +++ b/testng/src/test/java/util/testng/GalenBaseTest.java @@ -9,7 +9,7 @@ import java.util.List; import java.util.Properties; -import com.galenframework.speclang2.pagespec.SectionFilter; +import com.galenframework.gspeclang2.pagespec.SectionFilter; import org.apache.commons.lang3.StringUtils; import org.openqa.selenium.By; import org.openqa.selenium.Dimension;