vmware / vmware/pyvmomi

Fixtures should only have data in them directly pertinent to testing.

Open
#138 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted test
Dominant language
Python
Stars
2.3k
Forks
763
PR merge metrics
No merged PRs in 30d

Description

Testing fixtures should only contain data related to the test they are used in. That means if you have a test and fixture set that do not examine header information, you shouldn't have header information in the fixtures.

This also means that if you are not examining the request XML documents then, why include that data in the fixture? Take it out.

This is naturally lower priority than getting some kind of testing around an API call if there is no testing at all around some method. But, as a matter of improving practice and improving testing this should be an exercise in increasing the effectiveness of the tests as well as reducing the amount of information in the test system to its minimum.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no specific files, fixtures, or tests; start by locating the repository's fixture sets and the tests that consume them. For each fixture, identify data not asserted or used by its tests, then remove only that unrelated data and verify the affected test suite still passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.