Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OWASP ZAP で Playwright を使用する #5263

Merged
merged 9 commits into from
Jan 5, 2022

Conversation

nanasess
Copy link
Contributor

@nanasess nanasess commented Dec 20, 2021

概要(Overview・Refs Issue)

OWASP ZAP のペネトレーションテスト自動化で Selenium を使用してクロールしていましたが、最近は Playwright がとても良いということで書き換えてみました。
生産性に大きく貢献できそうですので、Selenium から Playwright へ置き換えていきたいと思います

メリット

  • chromedriver のセットアップ不要。 Docker イメージもある
  • とてもシンプルに記述できる
    • waitFor... とか勝手にやってくれる
  • テストの出力が見やすく、 GitHub Actions 用の reporter もある

デメリット

  • 歷史が短い
  • もしかしたら、 Selenium を使わないとクロールできないページが出てくるかもしれない
    • Selenium であれば、E2Eテストで使用している Codeception と同等のことができるはず
    • ファイルアップロード、ダウンロードは問題なくできそう

方針(Policy)

  • Selenium を Playwright に置き換える

実装に関する補足(Appendix)

テスト(Test)

相談(Discussion)

ぜひご意見ください

マイナーバージョン互換性保持のための制限事項チェックリスト

  • 既存機能の仕様変更はありません
  • フックポイントの呼び出しタイミングの変更はありません
  • フックポイントのパラメータの削除・データ型の変更はありません
  • twigファイルに渡しているパラメータの削除・データ型の変更はありません
  • Serviceクラスの公開関数の、引数の削除・データ型の変更はありません
  • 入出力ファイル(CSVなど)のフォーマット変更はありません

レビュワー確認項目

  • 動作確認
  • コードレビュー
  • E2E/Unit テスト確認(テストの追加・変更が必要かどうか)
  • 互換性が保持されているか
  • セキュリティ上の問題がないか
    • 権限を超えた操作が可能にならないか
    • 不要なファイルアップロードがないか
    • 外部へ公開されるファイルや機能の追加ではないか
    • テンプレートでのエスケープ漏れがないか

@nanasess nanasess force-pushed the use-playwright branch 2 times, most recently from 9dbeaed to 8deec5f Compare December 21, 2021 00:25
@codecov-commenter
Copy link

codecov-commenter commented Dec 22, 2021

Codecov Report

Merging #5263 (b92244e) into 4.1 (ef6b938) will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##                4.1    #5263      +/-   ##
============================================
- Coverage     68.45%   68.43%   -0.02%     
  Complexity     6121     6121              
============================================
  Files           461      461              
  Lines         25166    25166              
============================================
- Hits          17227    17223       -4     
- Misses         7939     7943       +4     
Flag Coverage Δ
E2E 56.71% <ø> (-0.03%) ⬇️
Unit 76.16% <ø> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...be/Service/PurchaseFlow/Processor/TaxProcessor.php 70.49% <0.00%> (-3.28%) ⬇️
...orage/Handler/SameSiteNoneCompatSessionHandler.php 88.05% <0.00%> (-2.99%) ⬇️
...ontroller/Admin/Product/ProductClassController.php 80.28% <0.00%> (-0.49%) ⬇️
src/Eccube/Service/PluginApiService.php 47.82% <0.00%> (+0.86%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ef6b938...b92244e. Read the comment docs.

@chihiro-adachi chihiro-adachi added this to the 4.1.2 milestone Jan 5, 2022
@chihiro-adachi chihiro-adachi merged commit 65af79f into EC-CUBE:4.1 Jan 5, 2022
@chihiro-adachi
Copy link
Contributor

chihiro-adachi commented Jan 5, 2022

@nanasess
ありがとうございます。
特に問題はないと思いますのでマージしました。
いったんPlaywrightで進めてみましょう

@nanasess nanasess deleted the use-playwright branch October 3, 2022 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants