Skip to content

Commit

Permalink
chore(package): Update Samples
Browse files Browse the repository at this point in the history
  • Loading branch information
hypery2k committed Feb 15, 2018
1 parent dabd970 commit 63404c4
Show file tree
Hide file tree
Showing 14 changed files with 36 additions and 21 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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/*
Expand Down
2 changes: 1 addition & 1 deletion javascript/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion javascript/gulp/Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
3 changes: 1 addition & 2 deletions javascript/runCI.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -18,4 +17,4 @@ cd ../../gulp
npm test

cd ../../grunt
npm test
npm test
9 changes: 9 additions & 0 deletions javascript/runSauceLabs.sh
Original file line number Diff line number Diff line change
@@ -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
8 changes: 4 additions & 4 deletions javascript/testSuite/bootstrap/basic.test
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
check specs/cssPageLayout.gspec --include "${tags}"
10 changes: 5 additions & 5 deletions javascript/testSuite/bootstrap/saucelabs.test
Original file line number Diff line number Diff line change
@@ -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}"
check specs/homePageLayout.gspec --include "${device}"
2 changes: 1 addition & 1 deletion junit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion junit/config
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 7 additions & 2 deletions junit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<forkCount>4</forkCount>
<reuseForks>true</reuseForks>
</configuration>
</plugin>
</plugins>
</pluginManagement>
Expand Down Expand Up @@ -181,10 +185,11 @@
<slf4j.version>1.6.1</slf4j.version>
<log4j.version>1.2.16</log4j.version>
<slf4j.version>1.6.1</slf4j.version>

<webdriver.gecko.driver>/opt/dev/geckodriver</webdriver.gecko.driver>
<webdriver.chrome.driver>/opt/dev/chromedriver</webdriver.chrome.driver>
<!-- testing dependency versions -->
<junit.version>4.11</junit.version>
<galen.version>2.2.4</galen.version>
<galen.version>2.3.6</galen.version>
<selenium.version>2.53.0</selenium.version>

<!-- Maven Plugins -->
Expand Down
2 changes: 1 addition & 1 deletion junit/src/test/java/sample/layout/CssLayoutTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion junit/src/test/java/sample/util/GalenBaseTest.java
Original file line number Diff line number Diff line change
@@ -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.*;
Expand Down
2 changes: 1 addition & 1 deletion testng/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@

<!-- testing dependency versions -->
<testng.version>6.8.8</testng.version>
<galen.version>2.2.4</galen.version>
<galen.version>2.3.6</galen.version>
<selenium.version>2.53.0</selenium.version>

<!-- Maven Plugins -->
Expand Down
2 changes: 1 addition & 1 deletion testng/src/test/java/util/testng/GalenBaseTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 63404c4

Please sign in to comment.