Clarify: Test Object `name` and `suite`
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- python
- Domain
- documentation, testing-qa
Research direction
Start with sections 9.4 (name) and 9.9 (suite), then compare their wording with the Python unittest example in the issue. Clarify how the method name, test title, and suite hierarchy should be represented, including whether the title belongs in the standard fields or an extra field; done when the specification gives an unambiguous recommendation.
Written by the indexing model from the issue text.
Description
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?
- Dominant language
- No language data
- Stars
- 97
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ctrf-io/ctrf
-
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
Difficulty 4/5 1-2 days Newbie friendliness 48/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Similar issues
-
area/docs kind/documentation priority/backlog triage/accepted
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
lexfrei/cloudflare-tunnel-gateway-controller#943 ·
Maintainers usually reply within 1 day
-
good first issue hacktoberfest
Difficulty 1/5 Under an hour Newbie friendliness 92/100
RogueAlg0/taken#386 · 3 comments ·
Maintainers usually reply within 1 day
-
documentation tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100
iptv-org/awesome-iptv#823 ·
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day