Answer: GitHub Copilot's custom instructions example recommends using pytest fixtures for setup and teardown, mocking external dependencies (databases, APIs, file operations), using parameterized tests for testing multiple similar scenarios, and testing edge cases and error conditions, not just happy paths. Status: Confirmed Entry: tool/github-copilot/features/unit-test-instruction-example Revision: 2 Digest: sha256:5ddd6d02b18d3f09 (changes whenever the content changes) Timeline: Created: 2026-11-15T13:23:50Z Last changed: 2026-11-16T13:01:03Z (edge cases practice: — → Test edge cases and error conditions, not just happy paths) Last verified: 2026-11-20T13:16:26Z Next check: 2026-11-21T13:16:26Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of fixtures practice | Use pytest fixtures for setup and teardown | [1] | 2026-11-20 mocking practice | Mock external dependencies (databases, APIs, file operations) | [1] | 2026-11-20 parameterized tests practice | Use parameterized tests for testing multiple similar scenarios | [1] | 2026-11-20 edge cases practice | Test edge cases and error conditions, not just happy paths | [1] | 2026-11-20 Sources: [1] GitHub. "Testing automation - GitHub Docs". https://docs.github.com/en/copilot/tutorials/customization-library/custom-instructions/testing-automation Role: primary. Accessed: 2026-11-20T13:16:26Z Quote: "Use pytest fixtures for setup and teardown" (Supports: fixtures practice) Quote: "Mock external dependencies (databases, APIs, file operations)" (Supports: mocking practice) Quote: "Use parameterized tests for testing multiple similar scenarios" (Supports: parameterized tests practice) Quote: "Test edge cases and error conditions, not just happy paths" (Supports: edge cases practice) Snapshot SHA-256: 4ecb2708197b632827aaa3bffcab26060be46c13076d3b7445f6680e5e36db32 (captured 2026-11-18T13:13:06Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-18T13:13:07Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:16:26Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:16:26Z Last attempt: 2026-11-20T13:16:26Z Notes and limitations: Extracted automatically from a single official source (section "Testing automation"). Related: https://latestn.com/tool/github-copilot/features/unit-test-prompt-contents What does the GitHub Copilot unit test generation prompt contain? https://latestn.com/tool/github-copilot/features/unsupported-instruction-types What should I not include in GitHub Copilot code review custom instructions? https://latestn.com/tool/github-copilot/features/use-copilot-chat-edit-mode How do I use GitHub Copilot Chat in edit mode to change code? https://latestn.com/tool/github-copilot/features/translate-code-example-response What does a GitHub Copilot response look like when translating code between languages? https://latestn.com/tool/github-copilot/features/translate-code-prompt How do I use GitHub Copilot to translate code to a different programming language? https://latestn.com/tool/github-copilot/features/unit-test-example-response What does a GitHub Copilot response look like when it generates unit tests? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-16T13:01:03Z | changed | edge cases practice: — → Test edge cases and error conditions, not just happy paths | [1] 2026-11-16T13:01:03Z | changed | parameterized tests practice: — → Use parameterized tests for testing multiple similar scenarios | [1] 2026-11-16T13:01:03Z | changed | mocking practice: — → Mock external dependencies (databases, APIs, file operations) | [1] 2026-11-16T13:01:03Z | changed | fixtures practice: — → Use pytest fixtures for setup and teardown | [1] 2026-11-16T13:01:03Z | changed | Testing practice 4: Test edge cases and error conditions, not just happy paths → — | [1] 2026-11-16T13:01:03Z | changed | Testing practice 3: Use parameterized tests for testing multiple similar scenarios → — | [1] 2026-11-16T13:01:03Z | changed | Testing practice 2: Mock external dependencies (databases, APIs, file operations) → — | [1] 2026-11-16T13:01:03Z | changed | Testing practice 1: Use pytest fixtures for setup and teardown → — | [1] 2026-11-15T13:23:50Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/github-copilot/features/unit-test-instruction-example/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/github-copilot/features/unit-test-instruction-example POST: https://latestn.com/dispute/tool/github-copilot/features/unit-test-instruction-example with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/github-copilot/features/unit-test-instruction-example?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). What testing practices does GitHub Copilot recommend in its custom instructions example for unit tests? Revision 2, last verified 2026-11-20T13:16:26Z. https://latestn.com/tool/github-copilot/features/unit-test-instruction-example (accessed 2026-11-21T09:50:47Z). @misc{LatestN_tool_github_copilot_features_unit_test_instruction_example_r2, title = {What testing practices does GitHub Copilot recommend in its custom instructions example for unit tests?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/github-copilot/features/unit-test-instruction-example}}, note = {Revision 2; digest sha256:5ddd6d02b18d3f09; last verified 2026-11-20T13:16:26Z; accessed 2026-11-21T09:50:47Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/github-copilot/features/unit-test-instruction-example