Clarify: Test Object `name` and `suite`
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- python
調査の方向性
セクション9.4 (name) と9.9 (suite)から始め、次にそれらの文言をissue内のPython unittestの例と比較します。メソッド名、テストタイトル、Suite階層をどのように表現すべきかを明確にし、タイトルを標準フィールドに含めるのか、それとも追加フィールドに含めるのかも明らかにします。仕様に曖昧さのない推奨事項が示されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Please clarify how to document a tests:
- title
- name
- suite hierarchy
Current State of the Spec
Under section "9.4. name" the spec says:
The name or title of the test case.
Under section "9.9. suite" the spec says:
An ordered list of suite or grouping names to which this test belongs, ordered from the top-level suite to the immediate parent of the test.
Situation for xUnit (i.e. Python unittest)
Best explained with an example:
File tests/test_ping.py:
class TestPingTestCase(unittest.TestCase):
def test_icmp_ping(self):
"""Test Reachability With ICMP Ping
"""
... # test code omitted
I would like to document:
- the suite the test belongs to:
["tests", "test_ping", "TestPingTestCase"] - the tests method name:
"test_icmp_ping" - the tests title (from the so called doc-string):
"Test Reachability With ICMP Ping"
- According to "9.9 suite", the test methods name does not belong to
suite:to the immediate parent of the test
- Now is left "9.4 name": To ensure that the test can be clearly identified, I need to choose as name the test methods name (
"test_icmp_ping"). Also the test method always exists. - The title of the test (
"Test Reachability With ICMP Ping") therefore can't be taken into account. Documenting a test is optional anyway and could be documented within e.g.results.tests[].extra.<NAMESPACE>.title.
Resulting in:
- set
nameto"test_icmp_ping" - set
suiteto["tests", "test_ping", "TestPingTestCase"] - omit the tests title or e.g. set
results.tests[].extra.<NAMESPACE>.titleto"Test Reachability With ICMP Ping"
Evaluated and Rejected Alternatives:
- Add the tests method name to the "suite" like this:
["tests", "test_ping", "TestPingTestCase", "test_icmp_ping"]and document the optional title under "name". This contradicts the spec forsuitestating the "up to the immediate parent" andnamebeing mandatory. --> No go - Keep
suite"up to the immediate parent" (["tests", "test_ping", "TestPingTestCase"]) and setnameto"test_icmp_ping: Test Reachability With ICMP Ping"to include both the tests method name and title (if available). This potentially could put a burden to the consumer being able to split the method name from the optional title. --> Bad
Would you also recommend to omit the tests title?
- 主要言語
- 言語のデータがありません
- スター
- 99
- フォーク
- 4
- 平均マージ
- 1時間 21分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ctrf-io/ctrf のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
-
難易度 3/5 半日 初心者へのやさしさ 32/100
-
難易度 4/5 1〜2日 初心者へのやさしさ 48/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
似ている issue
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
-
area: docs good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
-
difficulty: easy documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
lane:repo
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
SPARDiffData/differential-data-collection#42 ·
メンテナーはふだん 1 日以内に返信
-
SQLAlchemy 2.0 cleanup: drop_all bind, dead metadata.bind, sql_query read-only対応中かも @dr-rodriguez が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
astrodbtoolkit/AstrodbKit#112 ·