---
title: クラウドでのPuppeteerAutomation
description: TestingBotを使用して、自動化されたPuppeteerスクリプトを大規模に実行します。 Puppeteerスクリプトをクラウドベースのブラウザグリッドに接続します。
source_url:
  html: https://ja.testingbot.com/features/automation/puppeteer
  md: https://ja.testingbot.com/features/automation/puppeteer.md
---

操り人形師の雲 
# 実際のブラウザクラウド上でPuppeteerを実行する

既存のPuppeteerスクリプトをTestingBotのグリッドに接続し、Windows、macOS、Linux上の実際のChromeとEdgeで実行できます。大規模な並列処理、ビデオとログのアーティファクト、EUデータ所在地のGDPR準拠。

[無料で始める](https://ja.testingbot.com/users/sign_up) [デモをリクエストする](https://testingbot.com/demo)

- **ブラウザとOS:** Chrome · Edge
- **並行セッション:** 100
- **稼働時間SLA:** 99.9%

世界で最も革新的な企業のいくつかから信頼されています

 30秒で答える 
## TestingBot上でPuppeteerを実行する理由とは？

本物のクロームとエッジ

TestingBotは、実際のWindows、macOS、Linuxマシン上で、実際のChromeとEdgeに対してPuppeteerスクリプトを実行します。「ノートパソコンのヘッドレスChromiumでは動作する」といった予期せぬ事態はもうありません。

大規模並列処理

最大100個のPuppeteerセッションを同時に実行でき、各セッションは専用の仮想マシンで動作します。ヘッドレスモードかヘッドフルモードかは、セッションごとに選択可能です。

レコーダーとその他

Puppeteer Recorderを使用すれば、コードを一行も書かずにスクリプトを生成できます。ブラウザ拡張機能のテスト、Webスクレイピング、クロスブラウザの並列テストスイートの実行を同じダッシュボードから行えます。

 パペッティアとは何ですか？ 
## 60秒でわかる人形遣い

 ![Puppeteer](https://ja.testingbot.com/assets/support/puppeteer-0a8cdd38af69dabd46638afbb3bffc8a372902949aa599663ec379f3e875263c.svg)

### Puppeteer

Released 2017 · Chrome DevTools team · Apache 2.0

Puppeteerは、Chrome DevToolsチームが開発したNode.jsライブラリで、DevToolsプロトコルを介してChromeとChromiumを操作します。これは、元祖「ヘッドレスChrome」自動化ライブラリであり、JavaScriptからChromeをスクリプト化する最速の方法として今もなお知られています。

Puppeteerは、スクリーンショット、PDF、ネットワーク傍受、パフォーマンス追跡、ページメトリクスなどのための優れたAPIを提供します。Chromeファーストのエンドツーエンドテスト、Webスクレイピング、ヘッドレスレンダリングパイプラインにおいて、Puppeteerはまさに最適な選択肢です。

- Node.jsライブラリ、JavaScript / TypeScript
- Chrome、Chromium、Edge（DevToolsプロトコル経由）
- 一流のスクリーンショット、PDF、ネットワーク傍受
- ヘッドレスとヘッドフル、単一のAPI
- Chrome DevTools チームによって管理されています

 5ライン設定 
## スクリプトをTestingBotグリッドに向けてください

既存のPuppeteerコードを再利用しましょう。TestingBotのWebSocketエンドポイントに接続すれば、スクリプトは実際のChromeとEdge上で並行して実行されます。

connect.js step 1

```javascript
// Connect Puppeteer to TestingBot's cloud
const puppeteer = require('puppeteer-core');

const caps = {
  browserName: 'chrome',
  browserVersion: 'latest',
  platform: 'WIN11',
  'tb:options': { key: 'KEY', secret: 'SECRET' },
};

const browser = await puppeteer.connect({
  browserWSEndpoint: `wss://cloud.testingbot.com?caps=${
    encodeURIComponent(JSON.stringify(caps))}`,
});
```

login.spec.js step 2

```javascript
// Your existing Puppeteer script, unchanged
const page = await browser.newPage();

await page.goto('https://app.example.com/login');
await page.type('#user', 'jane');
await page.type('#pwd', '••••');
await Promise.all([
  page.click('#go'),
  page.waitForNavigation(),
]);

await page.screenshot({ path: 'dashboard.png' });
await browser.close();
```

Puppeteerの機能、ビデオ録画、並列処理オプションについては、 [TestingBotのPuppeteerに関する完全なドキュメント](https://testingbot.com/support/web-automate/puppeteer)を参照してください。

 ローカル vs クラウド 
## ローカルパペッティア vs テストボット

Puppeteerは、大規模な環境、複数のOS、あるいは本格的なエッジ環境が必要になるまでは、ノートパソコン上では高速に動作します。ホスト型クラウドとの比較は以下のとおりです。

| 能力 | テストボット | 地元の人形遣い |
| --- | --- | --- |
| ブラウザのカバー範囲 | 実際のChromeとEdgeの各バージョン | ローカルにインストールされているもの |
| オペレーティングシステム | 本物のWindows、macOS、Linux | あなたの唯一の開発マシン |
| 並列スケーリング | 最大100セッション同時接続可能（オンデマンド） | CPUとRAMによって制限されます |
| ビデオとログ | HDビデオ、コンソールログ、スクリーンショットが含まれています | 独自の録音とログキャプチャを作成する |
| プライベート環境とステージング環境をテストする | 内蔵型セキュアトンネル | 直接アクセスのみ、安全なリモート共有は不可 |
| EUデータ居住地 | はい、GDPRに準拠しています | あなたのノートパソコンがどの国にあるか |
| 信頼性 | 稼働率99.9%のSLA、24時間365日の監視 | 蓋を閉じるとクラッシュする |

 ![試験結果](https://ja.testingbot.com/assets/features/test-results-315382c39a67ad52167d2a4fd78570c99aea3e0ec386c17e82265851e93cb7b3.png)

 テスト成果物 
## 試験結果

各テスト結果には、さまざまなメタデータが含まれています。テストセッションのスクリーンショット、ログ、およびビデオ。

スクリプトからセッションを合格または不合格としてマークし、 [REST API](https://testingbot.com/support/api)を介して成果物を取得し、結果を Jira、Slack、または選択した CI に送信します。

- すべてのセッションでフルHDビデオを視聴可能
- コンソールと開発者ツールのログ
- スクリーンショットとPDFはご要望に応じて提供いたします。
- カスタム画面解像度、タイムゾーン、地域
- ブラウザの起動フラグと[その他多くのオプション](https://testingbot.com/support/web-automate/puppeteer/options)

 言語とランナー 
## テストフレームワークの統合

TestingBotは、PuppeteerおよびPuppeteerをサポートする一般的なテストフレームワークと統合されます。

- ### [Node.js](https://testingbot.com/support/web-automate/puppeteer/capabilities)

  - [Quickstart](https://testingbot.com/support/web-automate/puppeteer)
  - [Capabilities](https://testingbot.com/support/web-automate/puppeteer/capabilities)
  - [Browser flags](https://testingbot.com/support/web-automate/puppeteer/options)
  - [Test results](https://testingbot.com/support/web-automate/puppeteer/test-results)

- ### [Jest](https://testingbot.com/support/web-automate/puppeteer/jest)

  - [Jest with Puppeteer](https://testingbot.com/support/web-automate/puppeteer/jest)

- ### [WebDriverIO](https://testingbot.com/support/web-automate/puppeteer/webdriverio)

  - [WebDriverIO + Puppeteer](https://testingbot.com/support/web-automate/puppeteer/webdriverio)

- ### [CodeceptJS](https://testingbot.com/support/web-automate/puppeteer/codeceptjs)

  - [CodeceptJS setup](https://testingbot.com/support/web-automate/puppeteer/codeceptjs)

- ### [Python · PyTest](https://testingbot.com/support/web-automate/puppeteer/pytest)

  - [PyTest with Pyppeteer](https://testingbot.com/support/web-automate/puppeteer/pytest)

- ### [Go · chromedp](https://testingbot.com/support/web-automate/puppeteer/chromedp)

  - [chromedp setup](https://testingbot.com/support/web-automate/puppeteer/chromedp)

PuppeteerRecorderを使用してPuppeteerスクリプトを[記録](https://testingbot.com/support/web-automate/puppeteer/recorder)します。記録されたPuppeteerスクリプトをTestingBotのブラウザーグリッドで実行して、カバレッジを最大化します。

 大規模並列処理 
## パペッティアスイートの所要時間を数時間から数分に短縮

単一用途の仮想マシン上で、数百ものPuppeteerセッションを並列実行できます。ヘッドレスでもヘッドフルでも、同じスクリプトを使用でき、実稼働時間を大幅に短縮できます。

- 最大100の同時パペッティアセッション
- セッションは数秒で開始、ウォーミングアップなし
- ヘッドレスモードまたはヘッドフルモード、セッションごとに切り替え可能

[続きを読む](https://testingbot.com/support/web-automate/puppeteer/puppeteer-parallel-testing)

 ![パペッティアスイートの所要時間を数時間から数分に短縮](https://ja.testingbot.com/assets/features/selenium/parallel-0229d698e59a8a6b92fe50344a08634624f018331ecf8a849ef83cfb35e635a5.png)

Live exit nodes
10+ countries

アメリカ合衆国

イギリス

ドイツ

フランス

スペイン

ベルギー

オーストラリア

中国

日本

 位置情報テスト 
## 10カ国以上からテスト用パペッティアスクリプトを提供

世界中の実際の出口ノードからPuppeteerスクリプトを実行します。米国、英国、ドイツ、フランス、スペイン、ベルギー、オーストラリア、中国、日本などからの **ジオターゲティング** 、 **ジオブロッキング** 、 **ローカライゼーション** を検証します。

 安全なインフラストラクチャ 
## 本物の機械。使い捨て。液漏れゼロ。

Puppeteerの各セッションは、実際のオペレーティングシステム上で動作する、新品の使い捨て仮想マシン上で実行されます。スクリプトが終了すると同時に仮想マシンは破棄されるため、何も再利用されず、顧客間で情報が漏洩することもありません。

SOC 2に準拠し、GDPRにも準拠（EU域内データ保管）、SAML SSOに対応、監査ログは企業チーム向けに提供。

- セッションごとに消去される使い捨ての仮想マシン
- GDPR準拠、EUデータレジデンシー対応
- SAML SSO、監査ログ、およびSCIMプロビジョニング

[TestingBotトラストセンターにアクセス](https://trust.testingbot.com/)

1. 1

スクリプトは`cloud.testingbot.com`に接続します。

お客様のセッション専用の、クリーンな仮想マシンが数秒でプロビジョニングされます。

2. 2

Puppeteerは実際のChromeまたはEdgeを駆動します

本物のWindows、macOS、またはLinux。シミュレーションではなく、共有も一切なし。

3. 3

スクリプトが終了した瞬間にVMは破棄されます

Cookie、ファイル、ブラウザの状態など、すべて消去されます。何も再利用されることはありません。

 継続的インテグレーション 
## PuppeteerをCI/CDに数分で組み込む

TestingBotは、主要なCI/CDツールすべてと連携します。トリガーとなるPuppeteerはコミットごとに実行され、動画とログをビルドダッシュボードにストリーミング配信します。

 ![Jenkins](https://ja.testingbot.com/assets/integrations/jenkins-e586a1c4af833e4c8d38d7b392a4e84bd193f30cae9cf8c9f198a58ec943a1ff.webp)

### [Jenkins](https://testingbot.com/support/integrations/ci-cd/jenkins)

 ![Bamboo](https://ja.testingbot.com/assets/integrations/bamboo-c8fe09a3cb0b74d6055e3aa6607d77720bfe29ff487b8e3cf825138adf634346.svg)

### [Bamboo](https://testingbot.com/support/integrations/ci-cd/bamboo)

 ![TeamCity](https://ja.testingbot.com/assets/integrations/teamcity-7e75cdb835903a4983ad276c41d95e569ceac5be486e96ec1f955029ce5bb319.svg)

### [TeamCity](https://testingbot.com/support/integrations/ci-cd/teamcity)

 ![CircleCI](https://ja.testingbot.com/assets/integrations/circleci-ede029654ff39b60342e4a5bba8fc9a3a49305cc38bda215b7cf8d07e85e0543.webp)

### [CircleCI](https://testingbot.com/support/integrations/ci-cd/circleci)

 ![GitLab CI](https://ja.testingbot.com/assets/integrations/gitlab-e4c0b6db07d07bc0a400f5606e258f4dc8a51b778e97bbfa51d1d531f3cb049a.webp)

### [GitLab CI](https://testingbot.com/support/integrations/ci-cd/gitlab)

 ![GitHub](https://ja.testingbot.com/assets/integrations/github-actions-8436242ad9e15381f84f1a98a10dddce15611087f121d6305782e211942b7842.webp)

### [GitHub](https://testingbot.com/support/integrations/ci-cd/github-actions)

 Secure Tunnel 
## 内部アプリとステージングアプリを安全にテストする

ファイアウォールで保護されたステージングサイト、社内ダッシュボード、またはローカルホスト上のアプリケーションに対してPuppeteerスクリプトを実行するには、当社の[セキュアトンネルを](https://testingbot.com/support/tunnel)ご利用ください。

エンドツーエンドで暗号化され、受信ファイアウォールルールは不要で、主要なCIプロバイダーにすぐに利用できます。

 ![TestingBot secure tunnel for Puppeteer](https://ja.testingbot.com/assets/features/tunnel-diagram-poster-8c25e19e6fe4f7276a46a96b31a0ad0e07bb4f5bf98dc192d2b70897cfbb1a26.png)

[続きを読む](https://ja.testingbot.com/support/tunnel)

よくある質問
## TestingBotのPuppeteerに関するよくある質問

なぜPuppeteerをローカル環境ではなくTestingBot上で実行するのですか？

ローカル環境では、ラップトップまたはCIランナーによって処理能力が制限されます。TestingBotを使用すると、実際のWindows、macOS、Linuxマシン上で、実際のChromeおよびEdge上で最大100個のPuppeteerセッションを並列実行でき、HDビデオとコンソールログが自動的に収集されます。

どのPuppeteerバージョンがサポートされていますか？

TestingBotは、サポートされているすべてのPuppeteerリリースに対応しています。機能を使用することで、テストごとに特定のPuppeteerバージョンを指定できます。

Puppeteerのテストを並列実行することはできますか？

はい。TestingBotのプランでは、最大100個のPuppeteerセッションを並行して実行できます。各セッションは専用の仮想マシンで実行されるため、スクリプト同士が干渉することはありません。

PuppeteerはJest、WebDriverIO、またはCodeceptJSと併用できますか？

はい。Jest、 [WebDriverIO](https://testingbot.com/support/web-automate/puppeteer/jest) [、](https://testingbot.com/support/web-automate/puppeteer/webdriverio) [CodeceptJS](https://testingbot.com/support/web-automate/puppeteer/codeceptjs) 、さらに[PyTest](https://testingbot.com/support/web-automate/puppeteer/pytest)によるPython、 [chromedp](https://testingbot.com/support/web-automate/puppeteer/chromedp)によるGoに関する専用ガイドをご用意しています。

PuppeteerはSeleniumやPlaywrightとどう違うのですか？

PuppeteerはChromeとNodeを優先的にサポートし、SeleniumよりもAPIが小さく、動作が軽快で、Playwrightよりも適用範囲が狭いのが特徴です。Chrome/Edgeのみを使用し、スピード、スクリーンショット、PDF、ネットワーク制御を最小限の手順で実現したい場合は、Puppeteerを選択してください。TestingBotはこれら3つすべてを同じグリッド上でサポートします。

コードを書かずにPuppeteerのスクリプトを録画することはできますか？

はい、 [Puppeteer Recorderを](https://testingbot.com/support/web-automate/puppeteer/recorder)使用してクリック、タイプ、アサーションをキャプチャし、生成されたスクリプトをTestingBotグリッド上で実行してください。

内部サイトやステージングサイトをテストできますか？

はい、弊社の[セキュアトンネル](https://testingbot.com/support/tunnel)をインストールすれば、Puppeteerスクリプトはステージング環境、ローカルホスト、またはファイアウォールの内側にあるあらゆる場所にアクセスできるようになります。

PuppeteerクラウドはGDPR/SOC 2に準拠していますか？

TestingBotはGDPRに準拠し、EU域内にデータ拠点を置き、ISO 27001に準拠、STARレベル1認証を取得しています。エンタープライズプランでは、SAML SSO、SCIM、監査ログを提供しています。

## Puppeteer Testingを開始する準備はできましたか？

開始するには、 [PuppeteerTesting](https://testingbot.com/support/web-automate/puppeteer)のドキュメントを参照してください。

[無料トライアルを開始する](https://ja.testingbot.com/users/sign_up)

あなたが好きかもしれないリソース

[![Automated Testing with Puppeteer](https://ja.testingbot.com/assets/resources/articles/11-416015eb394d928299663409dccd67993b0a664f4b3ff456803fefc6bf1f325a.webp)](https://testingbot.com/resources/articles/automated-testing-with-puppeteer)
### [Automated Testing with Puppeteer](https://testingbot.com/resources/articles/automated-testing-with-puppeteer)

Puppeteer combined with a test framework provides a great way to run automated browser tests. Follow this guide for more information.

[続きを読む](https://testingbot.com/resources/articles/automated-testing-with-puppeteer)

[![Puppeteer Testing in the Cloud](https://ja.testingbot.com/assets/blog/2021/puppeteer.webp)](https://testingbot.com/blog/puppeteer-cloud-testing)
### [Puppeteer Testing in the Cloud](https://testingbot.com/blog/puppeteer-cloud-testing)

Start running Puppeteer tests in the cloud with TestingBot.

[続きを読む](https://testingbot.com/blog/puppeteer-cloud-testing)
