Skip to content

Playwright E2E 実行コマンド一覧

Local 向け Playwright E2E の npm スクリプト一覧です。前提・fixture・トラブルシュートは Playwright E2E 実行ガイド を参照してください。

package.jsontest:e2e*12 本です(セットアップ・fixture・レポート含む)。

共通の事前 export(fixture 必須 suite)

bash
export WP_ROOT="/Users/a/Local Sites/slotkouryaku/app/public"
export WP_CLI_BIN=/tmp/wp-cli-slotkouryaku   # シェル alias は不可。用意手順は実行ガイド参照
export SLOT_KOURYAKU_E2E_FIXTURE=1
export PLAYWRIGHT_BASE_URL=http://slotkouryaku.local

セットアップ・補助(3)

コマンド内容
npm run test:e2e:installChromium をインストール
npm run test:e2e:fixture有料記事 fixture CLI(WP-CLI)
npm run test:e2e:report直近の HTML レポートを開く

テスト実行(9)

コマンド対象
npm run test:e2echromium 一式(smoke + access + member-registration。WP-CLI 必須)
npm run test:e2e:headed上記を headed
npm run test:e2e:ui上記を UI モード
npm run test:e2e:paid-article-access有料記事 サイト内表示制御のみ
npm run test:e2e:paid-article-access:headed同上 headed
npm run test:e2e:member-registration会員登録〜メール確認(軽量)のみ
npm run test:e2e:member-registration:headed同上 headed
npm run test:e2e:paid-article-stripeStripe Checkout 通し(opt-in。通常 E2E には含まれない)
npm run test:e2e:paid-article-stripe:headed同上 headed

よく使う実行例

fixture 必須 suite(test:e2e / access / member-registration など)では、上の「共通の事前 export」を先に済ませてください。

bash
# 初回のみ
npm run test:e2e:install

# chromium 一式
PLAYWRIGHT_BASE_URL=http://slotkouryaku.local npm run test:e2e

# 会員登録のみ
npm run test:e2e:member-registration

# 有料記事 access のみ
npm run test:e2e:paid-article-access

# Stripe 通し(別 env が必要。方針は Stripe E2E ドキュメント参照)
npm run test:e2e:paid-article-stripe

詳細ドキュメント

内容正本
前提・Local 手順・アーティファクトPlaywright E2E 実行ガイド
有料記事 fixture有料記事 E2E fixture 実行ガイド
Stripe 通しの前提・方針有料記事 Stripe Checkout / Webhook E2E 方針