Skip to content

Commit

Permalink
Added the prerequisites readme links to the Artifacts' descriptions (#…
Browse files Browse the repository at this point in the history
…224)

* Added the prerequisites readme links to the Artifacts' descriptions

* Added links to sample config files in the README.md files

* Added ARM template to create a devtestlab with selenium-grid setup on it.
  • Loading branch information
Shreyas R authored and Mark Mydland committed May 4, 2017
1 parent 728077a commit cc9540f
Show file tree
Hide file tree
Showing 27 changed files with 991 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Artifacts/windows-seleniumgrid-hub/Artifactfile.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/Azure/azure-devtestlab/master/schemas/2016-11-28/dtlArtifacts.json",
"title": "Selenium-grid hub",
"description": "Use this artifact to setup your selenium-grid hub",
"description": "Use this artifact to setup your selenium-grid hub. For the prerequisites please check the readme on https://aka.ms/se-hub-prereqs",
"publisher": "Microsoft",
"tags": [
"PowerShell",
Expand Down
2 changes: 1 addition & 1 deletion Artifacts/windows-seleniumgrid-hub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ A simple artifact to setup a selenium-grid hub on your azure DevTestLab virtual
## Inputs

- Download link for the selenium standalone server .jar file.
- Optional .json configuration file for the hub.
- Optional <a href="https://github.com/SeleniumHQ/selenium/wiki/Grid2#configuring-the-hub-by-json">.json configuration file</a> for the hub.

## Features

Expand Down
2 changes: 1 addition & 1 deletion Artifacts/windows-seleniumgrid-node/Artifactfile.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/Azure/azure-devtestlab/master/schemas/2016-11-28/dtlArtifacts.json",
"title": "Selenium-grid node",
"description": "Use this artifact to setup your selenium-grid node",
"description": "Use this artifact to setup your selenium-grid node. For the prerequisites please check the readme on https://aka.ms/se-node-prereqs",
"publisher": "Microsoft",
"tags": [
"PowerShell",
Expand Down
2 changes: 1 addition & 1 deletion Artifacts/windows-seleniumgrid-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A simple artifact to setup a selenium-grid node on your azure DevTestLab virtual

- Download link for the selenium standalone server .jar file.
- IP address or FQDN of the machine on which the selenium-grid hub is running on.
- Optional .json configuration file for the node.
- Optional <a href="https://github.com/SeleniumHQ/selenium/wiki/Grid2#configuring-the-nodes-by-json">.json configuration file</a> for the node.

## Features

Expand Down
Empty file.
32 changes: 32 additions & 0 deletions Samples/201-dtl-create-lab-with-seleniumgrid/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Deploy a Selenium Grid on Azure DevTestLabs VMs.

<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FMicrosoft%2Fvsts-seleniumgrid%2FMicrosoft%2Fusers%2FshreyasRMsft%2Fdevtestlabs-seleniumgrid2%2FARM%2520Template%2Fazuredeploy.json%3Ftoken%3DAYBwFjRCw3_nHc8nsNdTbabV0yqIYolAks5ZFDu5wA%253D%253D" target="_blank">
<img src="http://azuredeploy.net/deploybutton.png"/>
</a>

Creates an Azure DevTest Lab with a <a href="https://github.com/SeleniumHQ/selenium/wiki/Grid2">selenium-grid</a> setup up on its VMs.

## Features

- Java is automatically installed on the VMs using the <a href="https://github.com/Azure/azure-devtestlab/tree/master/Artifacts/windows-chocolatey">windows-chocolatey</a> artifact.
- Latest versions of Chrome and Firefox (Internet Explorer comes with the OS) are installed on the node VMs along with respective drivers using the <a href="https://github.com/Azure/azure-devtestlab/tree/master/Artifacts/windows-selenium">windows-selenium</a> artifact.
- The selenium-grid is setup on the VMs using the <a href="">selenium-hub</a> and <a href="">selenium-node</a> artifacts.
- The grid is also self-healing, that is the hub/node process is brought back up with the last provided configuration in case it crashes or the VM is restarted. This allows you to stop your VMs when not in use and start them back up when necessary.
- The url which your remote webriver has to use, to run tests against the grid, is output after the deployment successfully completes. Just click on the deployment successful notification and look for the output field.

## FAQs

Q. Can I deploy different nodes with different capabilities/configurations?<br>
A. The ARM template at present only supports homogenous configuration. You may however use the selenium-grid artifacts individually to tweak the configuration of each VM. These artifacts can be found on the Azure Portal in the artifacts blade of any DevTest Lab instance.

Q. Can I change the base OS image or the size of the VMs?<br>
A. The template only exposes inputs related to the configuration of the grid and a few other general inputs. Other Advanced parameters like OS Version (Only Windows OS supported), VM size, VNet configuration etc will have to be modified by editing the template itself.<br>

Q. What OSes are supported?<br>
A. Only Windows OS is supported as of now.

Q. How many VMs are created by the template?<br>
A. The template creates one hub VM and the specified number of node VMs.

Q. I want to run tests on my grid, how do I get the hub Url?<br>
A. You can get the hub Url from the output field after clicking on the notification for successful deployment of the template. If you missed this then you can construct the url yourself. All you have to do is get the ipaddress/fqdn of the hub VM from the DevTest Lab instance you just created and replace it in this pattern - http://{ipaddress or fqdn}:4444/wd/hub
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SeleniumGridSetupService", "SeleniumGridSetupService\SeleniumGridSetupService.csproj", "{DB196FB1-754C-4801-A406-D4A453FDA854}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DB196FB1-754C-4801-A406-D4A453FDA854}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DB196FB1-754C-4801-A406-D4A453FDA854}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DB196FB1-754C-4801-A406-D4A453FDA854}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DB196FB1-754C-4801-A406-D4A453FDA854}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
</configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Copyright (c) Microsoft Corporation. All rights reserved.

using System.Web.Script.Serialization;

namespace SeleniumGridSetupService
{
internal class InputConfig
{
public string SeleniumGridJarFile;
public string Role;
public string HubRegisterUrl;
public string ConfigFile;
public string AdditionalParameters;

public InputConfig()
{

}

public InputConfig(string[] args)
{
SeleniumGridJarFile = args[0];
Role = args[1];
HubRegisterUrl = args[2];
ConfigFile = args[3];
AdditionalParameters = args[4];
}

public static InputConfig CreateInputConfig(string serializedInputConfig)
{
return new JavaScriptSerializer().Deserialize<InputConfig>(serializedInputConfig);
}

override public string ToString()
{
return new JavaScriptSerializer().Serialize(this);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Copyright (c) Microsoft Corporation. All rights reserved.

using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Threading.Tasks;

namespace SeleniumGridSetupService
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main(string[] args)
{
ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[]
{
new SeleniumGridSetupService()
};
ServiceBase.Run(ServicesToRun);
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright (c) Microsoft Corporation. All rights reserved.

using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration.Install;
using System.Linq;
using System.Threading.Tasks;

namespace SeleniumGridSetupService
{
[RunInstaller(true)]
public partial class ProjectInstaller : System.Configuration.Install.Installer
{
public ProjectInstaller()
{
InitializeComponent();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="serviceProcessInstaller1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 56</value>
</metadata>
<metadata name="serviceInstaller1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>196, 17</value>
</metadata>
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
</root>
Loading

0 comments on commit cc9540f

Please sign in to comment.