diff --git a/docs_source_files/content/grid/_index.ja.md b/docs_source_files/content/grid/_index.ja.md index 031fecb98948..cf0cbc77e1d8 100644 --- a/docs_source_files/content/grid/_index.ja.md +++ b/docs_source_files/content/grid/_index.ja.md @@ -4,29 +4,17 @@ chapter: true weight: 9 --- -{{% notice info %}} - ページは英語から日本語へ訳されています。 -日本語は話せますか?プルリクエストをして翻訳を手伝ってください! -{{% /notice %}} # Grid -_Selenium Grid_ is a smart proxy server -that allows Selenium tests to route commands to remote web browser instances. -Its aim is to provide an easy way to run tests in parallel on multiple machines. +_Selenium Grid_ は、SeleniumテストがコマンドをリモートWebブラウザーインスタンスにルーティングできるようにする賢いプロキシサーバーです。 +その目的は、複数のマシンで並行してテストを実行する簡単な方法を提供することです。 -With Selenium Grid, -one server acts as the hub that routes JSON formatted test commands -to one or more registered Grid nodes. -Tests contact the hub to obtain access to remote browser instances. -The hub has a list of registered servers that it provides access to, -and allows us to control these instances. +Selenium Gridでは、1つのサーバーが、JSON形式のテストコマンドを1つ以上の登録済みのグリッドノードにルーティングするハブとして機能します。 +テストはハブに接続して、リモートブラウザーインスタンスへのアクセスを取得します。 +ハブには、アクセスを提供する登録済みサーバーのリストがあり、これらのインスタンスを制御できます。 -Selenium Grid allows us to run tests in parallel on multiple machines, -and to manage different browser versions and browser configurations centrally -(instead of in each individual test). +Selenium Gridを使用すると、複数のマシンで並行してテストを実行し、さまざまなブラウザーバージョンとブラウザー構成を(個々のテストではなく)一元的に管理できます。 -Selenium Grid isn't a silver bullet. -It solves a subset of common delegation and distribution problems, -but will for example not manage your infrastructure -and might not suit your specific needs. +Selenium Gridは特効薬ではありません。 +一般的な委任および配布の問題のサブセットを解決しますが、たとえばインフラストラクチャを管理せず、特定のニーズに適さない場合があります。 diff --git a/docs_source_files/content/grid/components_of_a_grid.ja.md b/docs_source_files/content/grid/components_of_a_grid.ja.md index 93e757c018a4..ac156d55ee84 100644 --- a/docs_source_files/content/grid/components_of_a_grid.ja.md +++ b/docs_source_files/content/grid/components_of_a_grid.ja.md @@ -1,39 +1,28 @@ --- -title: "Components of a Grid" +title: "グリッドのコンポーネント" weight: 2 --- -{{% notice info %}} - ページは英語から日本語へ訳されています。 -日本語は話せますか?プルリクエストをして翻訳を手伝ってください! -{{% /notice %}} - ![Grid](/images/grid.png) -## Hub -* Intermediary and manager -* Accepts requests to run tests -* Takes instructions from client and executes them remotely on the nodes -* Manages threads - -A _Hub_ is a central point where all your tests are sent. -Each Selenium Grid consists of exactly one hub. The hub needs to be reachable -from the respective clients (i.e. CI server, Developer machine etc.) -The hub will connect one or more nodes -that tests will be delegated to. +## ハブ +* 仲介者およびマネージャー +* テストを実行する要求を受け入れます +* クライアントから命令を受け取り、ノード上でリモートで実行します +* スレッドを管理します -## Nodes +_ハブ_ は、すべてのテストが送信される中心点です。 +各Selenium Gridは、ちょうど1つのハブで構成されます。 +ハブは、それぞれのクライアント(CIサーバー、開発者マシンなど)から到達可能である必要があります。 +ハブは、テストが委任される1つ以上のノードを接続します。 -* Where the browsers live -* Registers itself to the hub and communicates its capabilities -* Receives requests from the hub and executes them +## ノード -_Nodes_ are different Selenium instances -that will execute tests on individual computer systems. -There can be many nodes in a grid. -The machines which are nodes do not need to be the same platform -or have the same browser selection as that of the hub or the other nodes. -A node on Windows might have the capability of -offering Internet Explorer as a browser option, -whereas this wouldn't be possible on Linux or Mac. +* ブラウザが存在する場所 +* ハブに自分自身を登録し、その機能を伝えます +* ハブからリクエストを受信して実行します +_ノード_ は、個々のコンピューターシステムでテストを実行するさまざまなSeleniumインスタンスです。 +グリッドには多くのノードが存在する場合があります。 +ノードであるマシンは、ハブまたは他のノードと同じプラットフォームであったり、同じブラウザーを選定する必要はありません。 +Windows上のノードは、Internet Explorerをブラウザーオプションとして提供する機能を備えている場合がありますが、これはLinuxまたはMacでは不可能です。 diff --git a/docs_source_files/content/grid/purposes_and_main_functionalities.ja.md b/docs_source_files/content/grid/purposes_and_main_functionalities.ja.md index e6381d6b39fb..1e025f5d5f7c 100644 --- a/docs_source_files/content/grid/purposes_and_main_functionalities.ja.md +++ b/docs_source_files/content/grid/purposes_and_main_functionalities.ja.md @@ -1,17 +1,13 @@ --- -title: "Purposes and main functionalities" -menuTitle: "Purposes and functionalities" +title: "目的と主な機能" +menuTitle: "目的と機能" weight: 1 --- -{{% notice info %}} - ページは英語から日本語へ訳されています。 -日本語は話せますか?プルリクエストをして翻訳を手伝ってください! -{{% /notice %}} +* すべてのテストの中央エントリポイント +* ブラウザーが実行されるノード・環境の管理と制御 +* スケーリング +* テストを並列実行 +* クロスプラットフォームでのテスト +* 負荷分散 -* Central entry point for all tests -* Management and control of the nodes / environment where the browsers run -* Scaling -* Running tests in parallel -* Cross platform testing -* Load balancing diff --git a/docs_source_files/content/grid/setting_up_your_own_grid.ja.md b/docs_source_files/content/grid/setting_up_your_own_grid.ja.md index 5472f007ff0a..9aa8553d1700 100644 --- a/docs_source_files/content/grid/setting_up_your_own_grid.ja.md +++ b/docs_source_files/content/grid/setting_up_your_own_grid.ja.md @@ -1,86 +1,52 @@ --- -title: "Setting up your own Grid" +title: "独自のグリッドを設定する" weight: 3 --- -{{% notice info %}} - ページは英語から日本語へ訳されています。 -日本語は話せますか?プルリクエストをして翻訳を手伝ってください! -{{% /notice %}} -To use Selenium Grid, -you need to maintain your own infrastructure for the nodes. -As this can be a cumbersome and time intense effort, -many organizations use IaaS providers -such as Amazon EC2 and Google Compute -to provide this infrastructure. +Selenium Gridを使用するには、ノード用の独自のインフラストラクチャを維持する必要があります。 +これは面倒で時間のかかる作業になる可能性があるため、多くの組織はこのインフラストラクチャを提供するためにAmazon EC2やGoogle ComputeなどのIaaSプロバイダーを使用しています。 -Other options include using providers such as Sauce Labs or Testing Bot -who provide a Selenium Grid as a service in the cloud. -It is certainly possible to also run nodes on your own hardware. -This chapter will go into detail about the option of running your own grid, -complete with its own node infrastructure. +他の選択肢として、クラウドのサービスとしてSelenium Gridを提供するSauce LabsやTesting Botなどのプロバイダーの使うこともできます。 +独自のハードウェアでノードを実行することも確かに可能です。 +この章では、独自のノードインフラストラクチャを備えた独自のグリッドを実行するオプションについて詳しく説明します。 +## クイックスタート -## Quick start +この例では、Selenium 2グリッドハブを起動し、WebDriverノードとSelenium 1 RCレガシーノードの両方を登録する方法を示します。 また、Javaからグリッドを呼び出す方法も示します。 +ここでは、ハブとノードが同じマシンで実行されていますが、もちろん、selenium-server-standaloneを複数のマシンにコピーできます。 -This example will show you how to start the Selenium 2 Grid Hub, -and register both a WebDriver node and a Selenium 1 RC legacy node. -We will also show you how to call the grid from Java. -The hub and nodes are shown here running on the same machine, -but of course you can copy the selenium-server-standalone to multiple machines. +`selenium-server-standalone`パッケージには、グリッドの実行に必要なハブ、WebDriver、およびレガシーRCが含まれています。 _ant_ はもう必要ありません。 +`selenium-server-standalone-.jar`は [https://selenium.dev/downloads/](https://selenium.dev/downloads/) からダウンロードできます。 -The `selenium-server-standalone` package includes the hub, -WebDriver, and legacy RC needed to run the Grid, -_ant_ is not required anymore. -You can download the `selenium-server-standalone-.jar` from -[https://selenium.dev/downloads/](https://selenium.dev/downloads/). +### ステップ1:ハブを開始する +ハブは、テストリクエストを受信し、それらを適切なノードに配布する中心点です。 +配布は機能ベースで行われます。 +つまり、一連の機能を必要とするテストは、その機能セットまたは機能のサブセットを提供するノードにのみ配布されます。 -### Step 1: Start the Hub +テストのDesiredCapabilitiesは、 _任意の_ を意味するため、ハブはDesiredCapabilitiesの設定に完全に一致するノードを見つけることを保証できません。 -The Hub is the central point that will receive test requests -and distribute them to the right nodes. -The distribution is done on a capabilities basis, -meaning a test requiring a set of capabilities -will only be distributed to nodes offering that set or subset of capabilities. - -Because a test's desired capabilities are just what the name implies, _desired_, -the hub cannot guarantee that it will locate a node -fully matching the requested desired capabilities set. - -Open a command prompt -and navigate to the directory where you copied -the `selenium-server-standalone.jar` file. -You start the hub by passing the `-role hub` flag -to the standalone server: +コマンドプロンプトを開き、`selenium-server-standalone.jar`ファイルをコピーしたディレクトリに移動します。 ハブを起動するには、`-role hub`フラグをスタンドアロンサーバーに渡します。 ```shell java -jar selenium-server-standalone.jar -role hub ``` -The Hub will listen to port 4444 by default. -You can view the status of the hub by opening a browser window and navigating to -[http://localhost:4444/grid/console](http://localhost:4444/grid/console). +ハブはデフォルトでポート4444をリッスンします。 ブラウザーウィンドウを開いて [http://localhost:4444/grid/console](http://localhost:4444/grid/console) に移動すると、ハブのステータスを表示できます。 -To change the default port, -you can add the optional `-port` flag -with an integer representing the port to listen to when you run the command. -Also, all of the other options you see in the JSON config file (seen below) -are possible command-line flags. +デフォルトのポートを変更するには、コマンドを実行するときにリッスンするポートを表す整数を持つオプションの `-port` フラグを追加できます。 +また、JSON構成ファイル(以下を参照)に表示される他のすべてのオプションは、可能なコマンドラインフラグです。 -You certainly can get by with only the simple command shown above, -but if you need more advanced configuration, -you can also specify a JSON format config file, for convenience, -to configure the hub when you start it. -You can do it like so: +確かに上記の簡単なコマンドだけでうまくいくことができますが、より高度な構成が必要な場合は、JSON形式の構成ファイルを指定して、開始時にハブを構成することもできます。 +JSON形式の構成ファイルを指定して開始時にハブを構成する方法は以下のとおりです。 ```shell java -jar selenium-server-standalone.jar -role hub -hubConfig hubConfig.json -debug ``` -Below you will see an example of a `hubConfig.json` file. -We will go into more detail on how to provide node configuration files in step 2. +以下に、 `hubConfig.json` ファイルの例を示します。 +ステップ2でノード構成ファイルを提供する方法について詳しく説明します。 ```json { @@ -100,48 +66,36 @@ We will go into more detail on how to provide node configuration files in step 2 ``` -### Step 2: Start the Nodes +### ステップ2:ノードを起動する -Regardless of whether you want to run a grid with new WebDriver functionality, -or a grid with Selenium 1 RC functionality, -or both at the same time, -you use the same `selenium-server-standalone.jar` file to start the nodes: +新しいWebDriver機能を備えたグリッドを実行するか、Selenium 1 RC機能を備えたグリッドを実行するか、または両方を同時に実行するかに関係なく、同じ `selenium-server-standalone.jar` ファイルを使用してノードを起動します。 ```shell java -jar selenium-server-standalone.jar -role node -hub http://localhost:4444 ``` -If a port is not specified through the `-port` flag, -a free port will be chosen. You can run multiple nodes on one machine -but if you do so, you need to be aware of your systems memory resources -and problems with screenshots if your tests take them. - +`-port` フラグでポートが指定されていない場合、空いているポートが選択されます。 +1台のマシンで複数のノードを実行できますが、実行する場合は、システムメモリリソースとスクリーンショットの問題をテストで確認する必要があることに注意する必要があります。 -#### Configuration of Node with options +#### オプションを使用したノード構成 -As mentioned, for backwards compatibility -“wd” and “rc” roles are still a valid subset of the “node” role. -But those roles limit the types of remote connections to their corresponding API, -while “node” allows both RC and WebDriver remote connections. +前述のように、下位互換性のために、"wd"および"rc"ロールは"node"ロールの有効なサブセットのままです。 +ただし、これらのロールは、対応するAPIへのリモート接続の種類を制限し、"node"はRCとWebDriverの両方のリモート接続を許可します。 -Passing JVM properties (using the `-D` flag -_before the -jar argument_) -on the command line as well, -and these will be picked up and propagated to the nodes: +コマンドラインでもJVMプロパティを( _-jar引数の前に_ `-D`フラグを使用して)渡すと、これらが取得され、ノードに伝播されます。 `-Dwebdriver.chrome.driver=chromedriver.exe` -#### Configuration of Node with JSON +#### JSONを使用したノード構成 -You can also start grid nodes that are configured -with a JSON configuration file +JSON設定ファイルで構成されたグリッドノードを起動することもできます。 ```shell java -Dwebdriver.chrome.driver=chromedriver.exe -jar selenium-server-standalone.jar -role node -nodeConfig node1Config.json ``` -And here is an example of a `nodeConfig.json` file: +そして、これは `nodeConfig.json` ファイルの例です。 ```json { @@ -185,72 +139,59 @@ And here is an example of a `nodeConfig.json` file: } ``` -A note about the `-host` flag +`-host` フラグに関する注意 -For both hub and node, if the `-host` flag is not specified, -`0.0.0.0` will be used by default. This will bind to all the -public (non-loopback) IPv4 interfaces of the machine. If you have a special -network configuration or any component that creates extra network interfaces, -it is advised to set the `-host` flag with a value that allows the -hub/node to be reachable from a different machine. +ハブとノードの両方で、`-host`フラグが指定されていない場合、デフォルトで`0.0.0.0`を使用します。 +これにより、マシンのすべてのパブリック(非ループバック)IPv4インターフェイスにバインドされます。 +特別なネットワーク構成または追加のネットワークインターフェイスを作成するコンポーネントがある場合は、`-host`フラグにハブ/ノードが別のマシンから到達できる値を設定することをお勧めします。 -#### Specifying the port +#### ポートを指定する -The default TCP/IP port used by the hub is 4444. If you need to change the port -please use above mentioned configurations. +ハブで使用されるデフォルトのTCP / IPポートは4444です。 +ポートを変更する必要がある場合は、上記の構成を使用してください。 -## Troubleshooting +## トラブルシューティング -### Using Log file -For advanced troubleshooting you can specify a log file to log system messages. -Start Selenium GRID hub or node with -log argument. Please see the below example: +### ログファイルを使用する +高度なトラブルシューティングのために、システムメッセージを記録するログファイルを指定できます。 -log引数を使用してSelenium GRIDハブまたはノードを起動します。 +以下の例をご覧ください。 ```shell java -jar selenium-server-standalone.jar -role hub -log log.txt ``` -Use your favorite text editor to open log file (log.txt in the example above) to find -"ERROR" logs if you get issues. +お気に入りのテキストエディターを使用してログファイル(上記の例ではlog.txt)を開き、問題が発生した場合に"エラー"ログを見つけます。 -### Using `-debug` argument +### `-debug` 引数を使用する -Also you can use `-debug` argument to print debug logs to console. -Start Selenium Grid Hub or Node with `-debug` argument. Please see -the below example: +-debug引数を使用して、デバッグログをコンソールに出力することもできます。 +`-debug` 引数を使用してSeleniumグリッドハブまたはノードを起動します。 +以下の例をご覧ください。 ```shell java -jar selenium-server-standalone.jar -role hub -debug ``` -## Warning +## 警告 -The Selenium Grid must be protected from external access using appropriate -firewall permissions. +Selenium Gridは、適切なファイアウォールアクセス許可を使用して外部アクセスから保護する必要があります。 -Failure to protect your Grid could result in one or more of the following occurring: +グリッドを保護しないと、次の1つ以上が発生する可能性があります。 -* You provide open access to your Grid infrastructure -* You allow third parties to access internal web applications and files -* You allow third parties to run custom binaries - -See this blog post on [Detectify](//labs.detectify.com), which gives a good -overview of how a publicly exposed Grid could be misused: -[Don't Leave your Grid Wide Open](//labs.detectify.com/2017/10/06/guest-blog-dont-leave-your-grid-wide-open/). +* グリッドインフラストラクチャへのオープンアクセスを提供します。 +* サードパーティが内部Webアプリケーションおよびファイルにアクセスすることを許可します。 +* サードパーティにカスタムバイナリの実行を許可します。 +[Detectify](//labs.detectify.com) に関するこのブログ投稿をご覧ください。 +これは、公開されたグリッドが悪用される可能性のある概要を示しています。 [Don't Leave your Grid Wide Open](//labs.detectify.com/2017/10/06/guest-blog-dont-leave-your-grid-wide-open/) ## Docker Selenium -[Docker](//www.docker.com/) provides a convenient way to -provision and scale Selenium Grid infrastructure in a unit known as a container. -Containers are standardised units of software that contain everything required -to run the desired application, including all dependencies, in a reliable and repeatable -way on different machines. - -The Selenium project maintains a set of Docker images which you can download -and run to get a working grid up and running quickly. Nodes are available for -both Firefox and Chrome. Full details of how to provision a grid can be found -within the [Docker Selenium](//github.com/SeleniumHQ/docker-selenium) -repository. - -### Prerequisite -The only requirement to run a Grid is to have Docker installed and working. -[Install Docker](//www.docker.com/products/docker-desktop). +[Docker](//www.docker.com/) は、コンテナと呼ばれる単位でSelenium Gridインフラストラクチャをプロビジョニングおよびスケーリングする便利な方法を提供します。 +コンテナは、さまざまなマシンで信頼性と再現性のある方法で、すべての依存関係を含む目的のアプリケーションを実行するために必要なすべてを含むソフトウェアの標準化されたユニットです。 + +Seleniumプロジェクトは、ダウンロードして実行して作業用グリッドを迅速に起動および実行できる一連のDockerイメージを保持しています。 ノードはFirefoxとChromeの両方で使用できます。 +グリッドのプロビジョニング方法の詳細は、 [Docker Selenium](//github.com/SeleniumHQ/docker-selenium) リポジトリ内にあります。 + +### 前提条件 +グリッドを実行するための唯一の要件は、Dockerをインストールして動作させることです。 +[Dockerのインストール](//www.docker.com/products/docker-desktop). diff --git a/docs_source_files/content/grid/when_to_use_grid.ja.md b/docs_source_files/content/grid/when_to_use_grid.ja.md index 366b795f6e3b..efa9fb5525a9 100644 --- a/docs_source_files/content/grid/when_to_use_grid.ja.md +++ b/docs_source_files/content/grid/when_to_use_grid.ja.md @@ -1,52 +1,28 @@ --- -title: "When to use Grid" +title: "グリッドを使用する場合" weight: 4 --- -{{% notice info %}} - Page being translated from -English to Japanese. Do you speak Japanese? Help us to translate -it by sending us pull requests! -{{% /notice %}} +一般的に、グリッドを使用する理由は2つあります。 +* 複数のブラウザー、複数のバージョンのブラウザー、および異なるオペレーティングシステムで実行されているブラウザーに対してテストを実行するため。 +* テストスイートがテストがパスするのに完了するのにかかる時間を短縮するため。 -Generally speaking, there’s two reasons why you might want to use Grid. +グリッドは、複数のマシンを使用してテストを並行して実行することにより、テストパスの実行を高速化するために使用されます。 +たとえば、100個のテストスイートがあり、それらのテストを実行するために4つの異なるマシン(VMまたは個別の物理マシン)をサポートするようにグリッドをセットアップした場合、テストスイートは単一のマシンでテストを連続して実行した場合と比較して(およそ)4分の1の時間で完了します。 +大規模なテストスイート、および大量のデータ検証を実行するような長時間実行されるテストスイートの場合、これは大幅な時間の節約になります。 +一部のテストスイートの実行には数時間かかる場合があります。 スイートの実行に費やす時間を増やすもう1つの理由は、開発者がAUTのコードをチェックインした後のテスト結果の所要時間を短縮することです。 +アジャイルソフトウェア開発を実践しているソフトウェアチームは、一晩テストパスを一晩待つのではなく、できるだけ早くテストフィードバックを求めています。 -* To run your tests against multiple browsers, multiple versions of browser, -and browsers running on different operating systems. -* To reduce the time it takes for the test suite to complete a test pass. +グリッドは、複数のランタイム環境、特に異なるブラウザーに対して同時に実行するテストをサポートするためにも使用されます。 +たとえば、仮想マシンの"グリッド"は、テスト対象のアプリケーションがサポートする必要がある異なるブラウザーをサポートするようにセットアップできます。 +したがって、マシン1にはInternet Explorer 8、マシン2、Internet Explorer 9、マシン3は最新のChrome、マシン4は最新のFirefoxを持っています。 +テストスイートが実行されると、Selenium-Gridは各テストブラウザーの組み合わせを受け取り、必要なブラウザーに対して実行する各テストを割り当てます。 -Grid is used to speed up the execution of a test pass by using -multiple machines to run tests in parallel. For example, if you have a suite of -100 tests, but you set up Grid to support 4 different machines (VMs or -separate physical machines) to run those tests, your test suite will complete -in (roughly) one-fourth the time as it would if you ran your tests sequentially -on a single machine. For large test suites, and long-running test suite such as -those performing large amounts of data-validation, this can be a significant -time-saver. Some test suites can take hours to run. Another reason to boost the -time spent running the suite is to shorten the turnaround time for test results -after developers check-in code for the AUT. Increasingly software teams -practicing Agile software development want test feedback as immediately as -possible as opposed to wait overnight for an overnight test pass. +さらに、すべて同じブラウザ、タイプ、およびバージョンのグリッドを持つことができます。 +たとえば、それぞれがFirefox 70の3つのインスタンスを実行する4台のマシンのグリッドを持つことができ、利用可能なFirefoxインスタンスの"ある意味"での"サーバーファーム"を可能にします。 +スイートが実行されると、各テストはグリッドに渡され、グリッドは次に利用可能なFirefoxインスタンスにテストを割り当てます。 この方法で、おそらく12のテストがすべて同時に並行して実行されるテストパスを取得し、テストパスの完了に必要な時間を大幅に短縮します。 -Grid is also used to support running tests against multiple runtime -environments, specifically, against different browsers at the same time. For -example, a ‘grid’ of virtual machines can be setup with each supporting a -different browser that the application to be tested must support. So, machine 1 -has Internet Explorer 8, machine 2, Internet Explorer 9, machine 3 the latest -Chrome, and machine 4 the latest Firefox. When the test suite is run, -Selenium-Grid receives each test-browser combination and assigns each test to -run against its required browser. - -In addition, one can have a grid of all the same browser, type and version. For -instance, one could have a grid of 4 machines each running 3 instances of -Firefox 70, allowing for a ‘server-farm’ (in a sense) of available Firefox -instances. When the suite runs, each test is passed to Grid which -assigns the test to the next available Firefox instance. In this manner one -gets test pass where conceivably 12 tests are all running at the same time in -parallel, significantly reducing the time required to complete a test pass. - -Grid is very flexible. These two examples can be combined to allow -multiple instances of each browser type and version. A configuration such as -this would provide both, parallel execution for fast test pass completion and -support for multiple browser types and versions simultaneously. +グリッドは非常に柔軟です。 +これらの2つの例を組み合わせて、各ブラウザタイプとバージョンの複数のインスタンスを許可することができます。 +このような構成では、迅速にテストがパスすることを完了するための並列実行と、複数のブラウザタイプおよびバージョンの同時サポートの両方が提供されます。