Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selenium Grid with Selenium 2.0b1 #6

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Selenium Grid ChangeLog
=========================

Summary of changes from 1.1.0 to 1.1.0.1
========================================

* Adding WebDriver and Selenium 2.0a6 support

Summary of changes from 1.0.8 to 1.1.0
======================================

Expand Down
134 changes: 92 additions & 42 deletions Selenium Grid.ipr

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions agent/Agent.iml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
<orderEntry type="module" module-name="WebServer" />
<orderEntry type="library" name="Commons" level="project" />
<orderEntry type="module" module-name="Core" />
<orderEntry type="library" name="Selenium Java Client Driver" level="project" />
<orderEntry type="module" module-name="Remote Control" />
<orderEntry type="library" name="Selenium Remote Control" level="project" />
</component>
<component name="RSpecModuleSettingsStorage">
<RSPEC_MODULE_SETTINGS_STORAGE_ID NAME="RSPEC_SUPPORT_TYPE" VALUE="NONE" />
Expand Down
121 changes: 61 additions & 60 deletions agent/build.xml
Original file line number Diff line number Diff line change
@@ -1,70 +1,71 @@
<project name="Selenium Grid Agent" default="package-standalone" basedir=".">

<description>Selenium Grid Agent</description>
<description>Selenium Grid Agent</description>

<property name="rootdir" value="${basedir}/.."/>
<property file="${rootdir}/project.properties"/>
<property name="name" value="Selenium Grid Agent"/>
<property name="artifact" value="selenium-grid-agent"/>
<property name="version" value="SNAPSHOT"/>
<property name="selenium.version" value="Set Me"/>
<property name="rootdir" value="${basedir}/.."/>
<property file="${rootdir}/project.properties"/>
<property name="name" value="Selenium Grid Agent"/>
<property name="artifact" value="selenium-grid-agent"/>
<property name="version" value="SNAPSHOT"/>
<property name="selenium.version" value="Set Me"/>


<import file="${rootdir}/lib/build/common-build.xml" />

<path id="compile.classpath">
<fileset dir="${rootdir}/vendor">
<include name="servlet-api-2.5-20081211.jar"/>
<include name="commons-logging-1.1.1.jar"/>
<import file="${rootdir}/lib/build/common-build.xml"/>

<include name="cobertura-1.9.jar"/>
<include name="log4j-1.2.9.jar"/>
<include name="asm-2.2.1.jar"/>
<include name="asm-tree-2.2.1.jar"/>
<include name="jakarta-oro-2.0.8.jar"/>

</fileset>
<pathelement location="${rootdir}/infrastructure/core/target/classes"/>
<pathelement location="${rootdir}/infrastructure/webserver/target/classes"/>
<pathelement path="${java.class.path}/"/>
</path>
<path id="compile.classpath">
<fileset dir="${rootdir}/vendor">
<include name="servlet-api-2.5-20081211.jar"/>
<include name="commons-logging-1.1.1.jar"/>

<path id="runtime.classpath">
<fileset dir="${rootdir}/vendor">
<include name="jetty-6.1.24.jar"/>
<include name="jetty-util-6.1.24.jar"/>
<include name="servlet-api-2.5-20081211.jar"/>
<include name="commons-httpclient-3.1.jar"/>
<include name="commons-codec-1.4.jar"/>
<include name="commons-logging-1.1.1.jar"/>
</fileset>
<pathelement location="${rootdir}/infrastructure/core/target/classes"/>
<pathelement location="${rootdir}/infrastructure/webserver/target/classes"/>
<pathelement location="${build.output}"/>
<pathelement path="${java.class.path}/"/>
</path>

<target name="package-standalone" depends="package" description="Package as a jar including all dependencies">
<package-standalone-jar main-class="com.thoughtworks.selenium.grid.agent.AgentServer">
<dependencies>
<zipfileset src="${rootdir}/infrastructure/core/target/dist/lib/selenium-grid-core-${version}.jar"/>
<zipfileset src="${rootdir}/infrastructure/webserver/target/dist/lib/selenium-grid-webserver-${version}.jar"/>
<zipfileset src="${rootdir}/vendor/jetty-6.1.24.jar"/>
<zipfileset src="${rootdir}/vendor/jetty-util-6.1.24.jar"/>
<zipfileset src="${rootdir}/vendor/servlet-api-2.5-20081211.jar"/>
<zipfileset src="${rootdir}/vendor/commons-httpclient-3.1.jar"/>
<zipfileset src="${rootdir}/vendor/commons-codec-1.4.jar"/>
<zipfileset src="${rootdir}/vendor/commons-logging-1.1.1.jar"/>
</dependencies>
</package-standalone-jar>
</target>
<include name="cobertura-1.9.4.1.jar"/>
<include name="log4j-1.2.9.jar"/>
<include name="asm-2.2.1.jar"/>
<include name="asm-tree-2.2.1.jar"/>
<include name="jakarta-oro-2.0.8.jar"/>

<target name="run" description="Launch a remote control">
<java classpathref="runtime.classpath"
classname="com.thoughtworks.selenium.grid.agent.AgentServer"
fork="true"
failonerror="true">
</java>
</target>
</fileset>
<pathelement location="${rootdir}/infrastructure/core/target/classes"/>
<pathelement location="${rootdir}/infrastructure/webserver/target/classes"/>
<pathelement path="${java.class.path}/"/>
</path>

<path id="runtime.classpath">
<fileset dir="${rootdir}/vendor">
<include name="jetty-6.1.24.jar"/>
<include name="jetty-util-6.1.24.jar"/>
<include name="servlet-api-2.5-20081211.jar"/>
<include name="commons-httpclient-3.1.jar"/>
<include name="commons-codec-1.4.jar"/>
<include name="commons-logging-1.1.1.jar"/>
</fileset>
<pathelement location="${rootdir}/infrastructure/core/target/classes"/>
<pathelement location="${rootdir}/infrastructure/webserver/target/classes"/>
<pathelement location="${build.output}"/>
<pathelement path="${java.class.path}/"/>
</path>

<target name="package-standalone" depends="package" description="Package as a jar including all dependencies">
<package-standalone-jar main-class="com.thoughtworks.selenium.grid.agent.AgentServer">
<dependencies>
<zipfileset src="${rootdir}/infrastructure/core/target/dist/lib/selenium-grid-core-${version}.jar"/>
<zipfileset
src="${rootdir}/infrastructure/webserver/target/dist/lib/selenium-grid-webserver-${version}.jar"/>
<zipfileset src="${rootdir}/vendor/jetty-6.1.24.jar"/>
<zipfileset src="${rootdir}/vendor/jetty-util-6.1.24.jar"/>
<zipfileset src="${rootdir}/vendor/servlet-api-2.5-20081211.jar"/>
<zipfileset src="${rootdir}/vendor/commons-httpclient-3.1.jar"/>
<zipfileset src="${rootdir}/vendor/commons-codec-1.4.jar"/>
<zipfileset src="${rootdir}/vendor/commons-logging-1.1.1.jar"/>
</dependencies>
</package-standalone-jar>
</target>

<target name="run" description="Launch a remote control">
<java classpathref="runtime.classpath"
classname="com.thoughtworks.selenium.grid.agent.AgentServer"
fork="true"
failonerror="true">
</java>
</target>

</project>
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package com.thoughtworks.selenium.grid.agent;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.junit.Test;

import java.io.IOException;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

public class JMVMLauncherTest {
public static final int SECOND = 1000;

Expand All @@ -16,7 +17,7 @@ public void canLaunchAnAgentAndStopIt() throws IOException, InterruptedException
final JVMHandle handle;

classpath = new Classpath();
classpath.add("/Users/ph7/Projects/Selenium Grid/agent/target/dist/lib/selenium-grid-agent-standalone-1.0.2.jar");
classpath.add("d:\\SeleniumGrid_Sponte\\selenium-grid\\agent\\target\\dist\\lib\\selenium-grid-agent-standalone-1.0.2.jar");
launcher = new JVMLauncher(classpath, "com.thoughtworks.selenium.grid.agent.AgentServer");
handle = launcher.launchNewJVM();
assertTrue(handle.alive());
Expand All @@ -26,21 +27,23 @@ public void canLaunchAnAgentAndStopIt() throws IOException, InterruptedException
assertFalse(handle.alive());
}


@Test
public void canCaptureProcessOutut() throws IOException {
public void canCaptureProcessOutut() throws IOException, InterruptedException {
final Classpath classpath;
final JVMLauncher launcher;
final JVMHandle handle;

classpath = new Classpath();
classpath.add("/Users/ph7/Projects/Selenium Grid/vendor/selenium-server-1.0-SNAPSHOT.jar");
classpath.add("/Users/ph7/Projects/Selenium Grid/remote-control/target/dist/lib/selenium-grid-remote-control-standalone-1.0.2.jar");
classpath.add(String.format("/Users/swozniak/Documents/git-projects/selenium-grid/vendor/selenium-server-standalone-%s.jar", "2.0b1"));
classpath.add(String.format("/Users/swozniak/Documents/git-projects/selenium-grid/remote-control/target/dist/lib/selenium-grid-remote-control-standalone-%s.jar", "1.1.0.2-SPONTE-SNAPSHOT"));

launcher = new JVMLauncher(classpath, "com.thoughtworks.selenium.grid.remotecontrol.SelfRegisteringRemoteControlLauncher");
handle = launcher.launchNewJVM();
assertTrue(handle.alive());
Thread.sleep(1 * SECOND);
handle.waitForProg(System.out);
}


}
Loading