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

テスト手法の調査 #27

Open
3 tasks
MaximizedOwl opened this issue Apr 22, 2021 · 6 comments
Open
3 tasks

テスト手法の調査 #27

MaximizedOwl opened this issue Apr 22, 2021 · 6 comments
Assignees
Labels

Comments

@MaximizedOwl
Copy link
Owner

MaximizedOwl commented Apr 22, 2021

調査したいこと
Reactでのテストのベストプラクティスを調査し、実際にテストしてみる。

背景・経緯
品質保証の効率化。

開始時の状況
テストに関する記述はない。

タスクリスト

  • テストに関する調査
  • テスト実施
  • 基礎固め完了

障壁
現状なし

その他
現状なし

参考資料

  1. https://ja.reactjs.org/docs/testing.html
@MaximizedOwl
Copy link
Owner Author

MaximizedOwl commented Apr 22, 2021

ブラウザでの表示をテストする方法について
jsdomを利用する。

しばしばテストは、ブラウザのような実際の描画用の画面にアクセスできない環境で実行されます。このような環境では、Node.js 内で実行される軽量のブラウザ実装である jsdom を使ってブラウザ環境をシミュレートすることをお勧めします。https://ja.reactjs.org/docs/testing-environments.html#mocking-a-rendering-surface

ただし、

レイアウトやナビゲーションのような機能は有していません

とあるように、実施できない機能もある。それでも実際にブラウザを開いてテストするよりもよいとのこと。

@MaximizedOwl
Copy link
Owner Author

https://youtu.be/fY_yvz2e0YI

  • テスティングトロフィー

@MaximizedOwl
Copy link
Owner Author

ベストプラクティス論

@MaximizedOwl
Copy link
Owner Author

@MaximizedOwl
Copy link
Owner Author

あとはテストを回すべきタイミングは?ビルドして、開発環境へのデプロイ前?

@MaximizedOwl
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant