Skip to content

Commit

Permalink
Seed SeLion 2.0.0-SNAPSHOT with Selenium 3-beta
Browse files Browse the repository at this point in the history
- Update SeLion grid to be Selenium 3-beta compatible
- Update Java version to 8
- Update Maven version to 3.2.x
- Add .editorconfig rules
- Add github new issue and PR templates
- Update README.MD
  • Loading branch information
Doug Simmons committed Nov 2, 2016
1 parent 9d9a587 commit de96989
Show file tree
Hide file tree
Showing 49 changed files with 800 additions and 520 deletions.
24 changes: 24 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120

[*.md]
trim_trailing_whitespace = false

[*.{java,xml}]
indent_style = space
indent_size = 4
continuation_indent_size = 4

[*.{js,html,css,yml,yaml.json}]
indent_style = space
indent_size = 2
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
### SeLion Version

### Component

### Expected Behavior

### Actual Behavior

### Steps to Reproduce

<!--
Please be sure to include an SSCCE (Short, Self Contained, Correct [compilable] example) http://sscce.org/
-->
4 changes: 4 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- [ ] By placing an `X` in the preceding checkbox, I verify that I am a PayPal employee or
I have signed the [Contributor License Agreement](https://github.com/paypal/SeLion#contributing)

---
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
language: java
sudo: false
jdk:
- oraclejdk7
- oraclejdk8
- openjdk7
script:
- sh -e utilities/travis-run-ci-tests.sh
after_success:
Expand All @@ -18,7 +16,7 @@ notifications:
on_success: always
on_failure: always
use_notice: true
webhooks:
webhooks:
urls:
- https://webhooks.gitter.im/e/a8fc34e427360ced7ebf
on_success: change
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ Projects we depend on that need contributors

Current version
---------------
[1.2.0](http://search.maven.org/#search%7Cga%7C1%7Cselion)
[1.2.0](http://search.maven.org/#search%7Cga%7C1%7Cselion) (Selenium 2.53.x based)

Development version
-------------------
2.0.0-SNAPSHOT
2.0.0-SNAPSHOT (Selenium 3.x based)

License
-----------
Expand Down
2 changes: 1 addition & 1 deletion archetype/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>com.paypal.selion</groupId>
<artifactId>SeLion-Parent</artifactId>
<version>1.2.0</version>
<version>2.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion archetype/src/main/resources/archetype-resources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<skipTests>false</skipTests>
<suiteXmlFile>src/test/resources/SampleSuite.xml</suiteXmlFile>
<selion.version>1.2.0</selion.version>
<selion.version>2.0.0-SNAPSHOT</selion.version>
</properties>

<dependencyManagement>
Expand Down
2 changes: 1 addition & 1 deletion client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>com.paypal.selion</groupId>
<artifactId>SeLion-Parent</artifactId>
<version>1.2.0</version>
<version>2.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion codegen/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>com.paypal.selion</groupId>
<artifactId>SeLion-Parent</artifactId>
<version>1.2.0</version>
<version>2.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>com.paypal.selion</groupId>
<artifactId>SeLion-Parent</artifactId>
<version>1.2.0</version>
<version>2.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion dataproviders/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>com.paypal.selion</groupId>
<artifactId>SeLion-Parent</artifactId>
<version>1.2.0</version>
<version>2.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
13 changes: 6 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@

<groupId>com.paypal.selion</groupId>
<artifactId>SeLion-Parent</artifactId>
<version>1.2.0</version>
<version>2.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>SeLion Parent POM</name>
<description>The SeLion Parent POM</description>
<url>http://selion.io</url>

<properties>
<compileSource>1.7</compileSource>
<compileSource>1.8</compileSource>
<skipTests>false</skipTests>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<selenium.version>2.53.1</selenium.version>
<selenium.version>3.0.0-beta3</selenium.version>
<iosdriver.version>0.6.5</iosdriver.version>
<selendroid.version>0.17.0</selendroid.version>
<appium.version>4.1.2</appium.version>
Expand Down Expand Up @@ -198,7 +198,7 @@
<source>${compileSource}</source>
<overview>${basedir}/src/main/resources/overview.html</overview>
<links>
<link>http://docs.oracle.com/javase/7/docs/api/</link>
<link>http://docs.oracle.com/javase/8/docs/api/</link>
</links>
<additionalparam>${javadoc.opts}</additionalparam>
</configuration>
Expand All @@ -220,7 +220,6 @@
<includes>
<include>**/*Test*.java</include>
</includes>
<argLine>-XX:MaxPermSize=128m -XX:-UseSplitVerifier</argLine>
</configuration>
</plugin>

Expand All @@ -243,10 +242,10 @@
<configuration>
<rules>
<requireMavenVersion>
<version>[3.0,)</version>
<version>[3.2,)</version>
</requireMavenVersion>
<requireJavaVersion>
<version>1.7</version>
<version>1.8</version>
</requireJavaVersion>
<requireReleaseDeps>
<onlyWhenRelease>true</onlyWhenRelease>
Expand Down
10 changes: 2 additions & 8 deletions project-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<parent>
<groupId>com.paypal.selion</groupId>
<artifactId>SeLion-Parent</artifactId>
<version>1.2.0</version>
<version>2.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>SeLion-Project-BOM</artifactId>
<packaging>pom</packaging>
<name>SeLion Project BOM</name>
<description>Provides a dependency bill of materials for SeLion projects</description>
<description>Provides a dependency bill of materials for SeLion projects</description>

<dependencyManagement>
<dependencies>
Expand Down Expand Up @@ -160,12 +160,6 @@
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>${selenium.version}</version>
<exclusions>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>servlet-api-2.5</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down
7 changes: 6 additions & 1 deletion server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>com.paypal.selion</groupId>
<artifactId>SeLion-Parent</artifactId>
<version>1.2.0</version>
<version>2.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down Expand Up @@ -147,6 +147,11 @@
<artifactId>commons-fileupload</artifactId>
</dependency>

<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
Expand Down
22 changes: 5 additions & 17 deletions server/src/main/java/com/paypal/selion/grid/JarSpawner.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

package com.paypal.selion.grid;

import static com.paypal.selion.pojos.SeLionGridConstants.*;

import java.io.IOException;
import java.util.Arrays;
import java.util.LinkedList;
Expand All @@ -29,7 +27,7 @@
import com.paypal.selion.logging.SeLionGridLogger;

/**
* This is a stand alone class which sets up SeLion dependencies and spawns {@link SeLionGridLauncher}.
* This is a stand alone class which sets up SeLion dependencies and spawns {@link SeLionGridLauncherV3}.
*/
public final class JarSpawner extends AbstractBaseProcessLauncher {

Expand Down Expand Up @@ -59,19 +57,9 @@ void printUsageInfo() {
usage.append(SEPARATOR);
usage.append("\n");
usage.append("Usage: java [system properties] -jar SeLion-Grid.jar [options] \n");
usage.append(" [selenium options] \n");
usage.append("\n");
usage.append(" Options:\n");
usage.append(" " + TYPE_ARG + " <sauce>: \n");
usage.append(" Used with '-role hub' to start a hub with the on demand \n");
usage.append(" sauce proxy \n");
usage.append(" " + SELION_CONFIG_ARG + " <config file name>: \n");
usage.append(" A SeLion Grid configuration JSON file \n");
usage.append(" " + SELION_NOCONTINUOUS_ARG + "\n");
usage.append(" Disable continuous restarting of node/hub sub-process \n");
usage.append("\n");
usage.append(" Selenium Options: \n");
usage.append(" Any valid Selenium standalone or grid dash option(s). \n");
usage.append(" Any valid standalone or grid dash options. See above.\n");
usage.append(" E.g. '-role hub -port 2054' -- To start a hub on port 2054. \n");
usage.append("\n");
usage.append(" System Properties: \n");
Expand Down Expand Up @@ -106,7 +94,7 @@ private CommandLine createJavaCommandForChildProcess() throws IOException {
cmdLine.addArguments(getJavaSystemPropertiesArguments());

// Set the classpath
cmdLine.addArguments(getJavaClassPathArguments("selenium-", SeLionGridLauncher.class.getName()));
cmdLine.addArguments(getJavaClassPathArguments("selenium-", SeLionGridLauncherV3.class.getName()));

// add the program argument / dash options
cmdLine.addArguments(getProgramArguments());
Expand All @@ -118,7 +106,7 @@ private CommandLine createJavaCommandForChildProcess() throws IOException {
@Override
String[] getJavaSystemPropertiesArguments() throws IOException {
LOGGER.entering();
List<String> args = new LinkedList<String>();
List<String> args = new LinkedList<>();

// include everything a typical process launcher would add for a java process
args.addAll(Arrays.asList(super.getJavaSystemPropertiesArguments()));
Expand All @@ -132,7 +120,7 @@ String[] getJavaSystemPropertiesArguments() throws IOException {

private String[] getWebDriverBinarySystemPropertiesArguments() {
LOGGER.entering();
List<String> args = new LinkedList<String>();
List<String> args = new LinkedList<>();
if (getLauncherOptions().isIncludeWebDriverBinaryPaths()
&& (getType().equals(InstanceType.SELENIUM_NODE) || getType().equals(InstanceType.SELENIUM_STANDALONE))) {
// Make sure we setup WebDriver binary paths for the child process
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*-------------------------------------------------------------------------------------------------------------------*\
| Copyright (C) 2016 PayPal |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance |
| with the License. |
| |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software distributed under the License is distributed |
| on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for |
| the specific language governing permissions and limitations under the License. |
\*-------------------------------------------------------------------------------------------------------------------*/

package com.paypal.selion.grid;

import com.beust.jcommander.Parameter;
import com.paypal.selion.pojos.SeLionGridConstants;

public class ProcessLauncherConfiguration {
public static final String NO_CONTINUOUS_RESTART = "noContinuousRestart";
@Parameter(
names = "-" + NO_CONTINUOUS_RESTART,
description = "<Boolean> : Disables continuous restart of the SeLion grid sub-process"
)
public boolean noContinuousRestart;

public static final String SELION_CONFIG = "selionConfig";
@Parameter(
names = "-" + SELION_CONFIG,
description = "<String> filename : A SeLion Grid configuration JSON file"
)
public String selionConfig = SeLionGridConstants.SELION_CONFIG_FILE;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*-------------------------------------------------------------------------------------------------------------------*\
| Copyright (C) 2015 PayPal |
| Copyright (C) 2015-2016 PayPal |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance |
| with the License. |
Expand All @@ -16,7 +16,6 @@
package com.paypal.selion.grid;

import com.paypal.selion.SeLionConstants;
import com.paypal.selion.pojos.SeLionGridConstants;

/**
* {@link LauncherOptions} which apply to {@link RunnableLauncher}s which spawn a new process
Expand Down Expand Up @@ -76,7 +75,7 @@ public interface ProcessLauncherOptions extends LauncherOptions {

/**
* Enable/Disable continuous restart. Can also be disabled via the dash argument
* {@link SeLionGridConstants#SELION_NOCONTINUOUS_ARG}. Default: enabled.
* {@link ProcessLauncherConfiguration#NO_CONTINUOUS_RESTART}. Default: enabled.
*/
<T extends ProcessLauncherOptions> T setContinuouslyRestart(boolean val);

Expand Down
Loading

0 comments on commit de96989

Please sign in to comment.