Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
Added appium:deviceName to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vania-pooh committed May 30, 2022
1 parent 7987b31 commit 57717f3
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions docs/quota-files.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
== Creating Quota Files

. Quota files define available browsers for each user. All quota files should be placed to the same directory.
. Quota files define available browsers for each user. All quota files should be placed to the same directory.
. For user ```username``` quota file should be named ```username.xml```.
. Each quota file contains the following XML:
+
Expand All @@ -21,7 +21,7 @@
</version>
<version number="60.0">
...
</version>
</version>
</browser>
<browser name="chrome" defaultVersion="67.0">
...
Expand All @@ -32,11 +32,11 @@
+
Here we define a list of browser names, their versions and default version for each browser. Each version has one or more regions (in cloud term, i.e. data centers). Every region contains one or more hosts. Each host defined in XML should have Selenium listening on specified port. The XML namespace is needed to be fully compatible with http://github.com/seleniumkit/gridrouter[original] Java GridRouter implementation.
+
NOTE: A frequent question being asked is the meaning of `count` attribute because the name for historical questions is a bit confusing. You can have hosts with different number of CPU and memory allowing to run different number of browsers simultaneously. So `count` is the relative host weight allowing to adjust the load to every host depending on its capacity. For example if your quota contains two hosts with `count = 1` and `count = 3` then new session requests will be distributed as `1:3` between these hosts. The easiest way to deliver uniform load distribution is to set `count` equal to total number of browsers available on the host. This is what we always recommend to do by default.
. Browser name is matched against `browserName` capability. Values are compared as strings and should be exactly equal. When testing mobile applications (e.g. with http://github.com/appium/appium[Appium]) `browserName` capability makes no sense and can be replaced by `deviceName` capability. Ggr will try to match both against browser name specified in XML.
NOTE: A frequent question being asked is the meaning of `count` attribute because the name for historical questions is a bit confusing. You can have hosts with different number of CPU and memory allowing to run different number of browsers simultaneously. So `count` is the relative host weight allowing to adjust the load to every host depending on its capacity. For example if your quota contains two hosts with `count = 1` and `count = 3` then new session requests will be distributed as `1:3` between these hosts. The easiest way to deliver uniform load distribution is to set `count` equal to total number of browsers available on the host. This is what we always recommend to do by default.

. Browser name is matched against `browserName` capability. Values are compared as strings and should be exactly equal. When testing mobile applications (e.g. with http://github.com/appium/appium[Appium]) `browserName` capability makes no sense and can be replaced by `deviceName` or `appium:deviceName` capability. Ggr will try to match both against browser name specified in XML.
. Version `number` is matched against `version` or `browserVersion` capability by prefix. For example both `61` and `61.0` in version capability (i.e. in your code) will match version number `61.0`.
. Similarly version `platform` attribute is matched against `platform` or `platformName` capability by prefix. When platform from capabilities equals to `ANY` - default platform will be chosen.
. Similarly version `platform` attribute is matched against `platform` or `platformName` capability by prefix. When platform from capabilities equals to `ANY` - default platform will be chosen.
. Sometimes you may need to have the same browser name and version on different platforms, e.g. Firefox on both Linux and Windows. To achieve this you need to add `defaultPlatform` and `platform` attributes to quota file as follows:
+
.Adding platform information to quota file
Expand All @@ -49,7 +49,7 @@ NOTE: A frequent question being asked is the meaning of `count` attribute becaus
</version>
<version number="61.0" platform="WINDOWS">
...
</version>
</version>
</browser>
...
</qa:browsers>
Expand All @@ -65,14 +65,14 @@ ws://ggr-host.example.com:4444/vnc/<session-id>
----
Browser VNC clients like https://github.com/novnc/noVNC[noVNC] work with such URLs out of the box. By default having an XML host entry like this...
[source,xml]
----
----
<host name="host1.example.com" port="4444" count="1"/>
----

...Ggr proxies all traffic from `host1.example.com:5900`. You can customize this by adding an optional `vnc` attribute to a host:

[source,xml]
----
----
<host name="host1.example.com" port="4444" count="1" vnc="vnc://host1.example.com:6900"/>
----

Expand Down Expand Up @@ -121,5 +121,5 @@ With these flags specified any browsers declared in `test.xml` file will be acce
You may want to show lists of available browsers in the user interface. To fetch this information from Ggr just use the following request:

$ curl -s http://test:[email protected]:4444/quota

This request returns quota file contents as JSON for specified user.

0 comments on commit 57717f3

Please sign in to comment.