arayabrain / barebone-studio

pipeline tool
GNU General Public License v3.0
1 stars 3 forks source link

FE自動テスト #263

Open ReiHashimoto opened 9 months ago

ReiHashimoto commented 9 months ago

現在はリリースやPRレビューの際に以下の項目を手動でGUIを操作してテストしています。 (ただし、直近の機能追加などで操作手順や結果が異なっているものもある) https://docs.google.com/spreadsheets/d/1CzgAPyy2AqsDKQ5Ob1kQuVJshY2FV89SPH_tevN67U4/edit#gid=0

検証作業の負荷が高いため、FEの自動テストでチェック可能な内容をできるだけ自動テストできるようにしたいです。

  1. 自動テストを導入できそうな項目の調査・精査(工数の見積も含む)(RP)
  2. 自動テスト対象の決定(ARAYA)
  3. 実装(RP)

まずは1を対応していただきたいです。 上記スプレッドシートに列を追加するなどしていただいてOKです。

既存の項目と同等のチェックができれば良いので、柔軟に提案していただきたいです。

関連

hunghongnam commented 9 months ago

FE auto test Hiện tại, khi khách review PR và release thì họ check các mục sau theo cách thao tác GUI thủ công. (Tuy nhiên, có một số quy trình thao tác và kết quả khác do bổ sung những tính năng gần đây, v.v.) https://docs.google.com/s Lansheet/d/1CzgAPyy2AqsDKQ5Ob1kQuVJshY2FV89SPH_tevN67U4/edit#gid=0

Vì tốn nhiều công số cho việc xác minh này nên khách muốn có thể auto test càng nhiều nội dung có thể kiểm tra được bằng các auto test của FE càng tốt.

1/Điều tra và khảo sát kĩ lưỡng các hạng mục có thể áp dụng auto test (bao gồm cả estimate công số) (RP) 2/Quyết định đối tượng auto test (ARAYA) 3/ Implement

Trước mắt là mình sẽ đối ứng mục 1 ở trên, mình có thể thêm cột vào file spreadsheet ở trên cũng ok

Mình có thể kiểm tra các mục giống vs các mục hiện có nên có thể linh hoạt đề xuất cho họ

hunghongnam commented 8 months ago

@ReiHashimoto 1の対応が完了しました。 Jest と puppeteerという自動ツールを使用する前提で 上記ファイルのG列に導入できそうな項目の概算工数を入れました。 ご確認お願い致します。 https://docs.google.com/spreadsheets/d/1CzgAPyy2AqsDKQ5Ob1kQuVJshY2FV89SPH_tevN67U4/edit#gid=0

tsuchiyama-araya commented 3 months ago

詰まっているところを別Issueを作成しました。

357

tsuchiyama-araya commented 3 months ago

【追加情報】

What to Test In general, your tests should cover the following aspects of your code:

  1. If a component renders with or without props
  2. How a component renders with state changes
  3. How a component reacts to user interactions

What Not to Test Testing most of your code is important, but here are some things you do not need to test:

  1. Actual Implementation: You do not need to test the actual implementation of a functionality. Just test if the component is behaving correctly. Let’s say you want to sort an array on the click of a button. There’s no need to test the actual sorting logic. You only test if the function was called and if the state changes are rendering correctly.
  2. Third Party libraries: If you are using any third party libraries like Material UI, no need to test those – they should already be tried and tested.
tsuchiyama-araya commented 3 months ago

必要そうなファイルを洗い出してみました。

https://docs.google.com/spreadsheets/d/1xTEH4U3F3VlVBVjqTDvXJUzrlJoo17S52B_K7rQKkvI/edit?gid=230976678#gid=230976678