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

skip や incomplete とマークされているテストの精査 #5096

Open
3 of 4 tasks
nanasess opened this issue Jul 28, 2021 · 4 comments
Open
3 of 4 tasks

skip や incomplete とマークされているテストの精査 #5096

nanasess opened this issue Jul 28, 2021 · 4 comments
Labels
improvement 機能改善
Milestone

Comments

@nanasess
Copy link
Contributor

nanasess commented Jul 28, 2021

概要(Overview)

ユニットテスト及び E2E テストにて、 skip や incomplete とマークされている行が100行以上ある。
本来、通さなくてはならないテストが通っていない可能性もあるため精査する

grep の結果は以下の通り(整理した内容はコメントに記載)

期待する内容(Expect) or 要望 (Requirement)

以下に分類、修正する

  • 本当に必要な skip の精査(e.g. SQLite の場合はスキップ)
  • 不要なテストの削除(e.g. 3系でのみ使用されていたテスト)
  • 未実装なのにもかかわらず skip とマークされているテストの精査
  • 未実装のテストの修正、未実装のまま残すものは issues を作成

再現手順(Procedure)

上記の一覧は、以下のコマンドで抽出可能

grep -rHn markTest ./tests > markTest.txt
grep -rHn skip ./codeception >> markTest.txt
grep -rHn incomplete ./codeception >> markTest.txt
sed -E "s,^\./(.*):([0-9]+):(.*)$,- [\1:\2:](https://github.com/EC-CUBE/ec-cube/blob/06b3d7c0d24587298b7271ceeeba5feb861801f6/\1#L\2) \`\3\`,g" -i.bak markTest.txt

環境 (environment)

  • EC-CUBE: 4.1 ブランチ

関連情報 (Ref)

@nanasess
Copy link
Contributor Author

nanasess commented Jul 28, 2021

本当に必要な skip の精査(e.g. SQLite の場合はスキップ)

以下以外のテストは、 skip とされていても基本的に incomplete として問題ないと思われる

@okazy okazy added the improvement 機能改善 label Jul 28, 2021
@okazy okazy added this to the 4.0.x milestone Jul 28, 2021
@nanasess
Copy link
Contributor Author

nanasess commented Jul 28, 2021

ロジックを精査しないと判断できないもの

4系になって使われなくなった3系のテストなども残ってそう

動くかどうか要検証

RequestStack に依存するテストが可能か要検証

ParameterBag を変更するテストが可能か要検証

多少の修正が必要

DoctrineBundle に起因する問題が解消可能か要調査

動くようにした方が良さそうなもの

E2Eテスト(分割実行する等で解消できるかも)

@nanasess
Copy link
Contributor Author

nanasess commented Jul 29, 2021

実装されるまでスキップ系

3.0→4.0バージョンアップ時に、機能開発が完了するまでスキップされていて、開発完了後に戻し忘れたり、消し忘れたと思われるもの
3系のロジックがそのまま残っていたりする

異なる販売種別を同時購入した際のエラーハンドリング

購入履歴からの再購入

複数配送時の受注編集画面

カバレッジに影響してそう

3系のロジック

検索条件のテスト

多少の修正が必要

@nanasess
Copy link
Contributor Author

nanasess commented Jul 30, 2021

修正済み

#5097 にて対応したもの

incomplete を外すだけで動作するもの

削除対象

3系の実装で、もう使用されていないもの等

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

No branches or pull requests

2 participants