Answer: To write integration tests with GitHub Copilot, break your request into smaller, more manageable pieces and use a specific prompt that scopes the tests to integration, asks for mocks to simulate external services, and emphasizes verification. For example, prompt Copilot: "Write integration tests for the deposit function in the BankAccount class. Use mocks to simulate the NotificationSystem and verify that it is called correctly after a deposit." Status: Confirmed Entry: tool/github-copilot/features/write-integration-tests-copilot Revision: 2 Digest: sha256:b022e592dd6de508 (changes whenever the content changes) Timeline: Created: 2026-11-13T13:05:49Z Last changed: 2026-11-18T13:15:27Z (test file: — → test_bank_account_integration.py) Last verified: 2026-11-20T13:18:33Z Next check: 2026-11-21T13:18:33Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of example prompt | Write integration tests for the deposit function in the BankAccount class. Use mocks to simulate the NotificationSystem and verify that it is called correctly after a deposit. | [1] | 2026-11-20 approach | break down our request for Copilot to write integration tests for the BankAccount class into smaller, more manageable pieces | [1] | 2026-11-20 test file | test_bank_account_integration.py | [1] | 2026-11-20 run command | python -m unittest test_bank_account_integration.py | [1] | 2026-11-20 Sources: [1] GitHub. "Writing tests with GitHub Copilot - GitHub Docs". https://docs.github.com/en/copilot/tutorials/write-tests Role: primary. Accessed: 2026-11-20T13:18:33Z Quote: "Prompt: "Write integration tests for the deposit function in the BankAccount class. Use mocks to simulate the NotificationSystem and verify that it is called correctly after a deposit."" (Supports: example prompt) Quote: "Here we'll break down our request for Copilot to write integration tests for the BankAccount class into smaller, more manageable pieces." (Supports: approach) Quote: "Add the generated code to a new file test_bank_account_integration.py ." (Supports: test file) Quote: "run the tests with command below to verify the results. python -m unittest test_bank_account_integration.py" (Supports: run command) Snapshot SHA-256: b9ec9918c869408fc5b3c0d92cf7fed517a88bf74b6563acd7dcb5b69263f548 (captured 2026-11-18T13:15:26Z) 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:15:27Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:18:33Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:18:33Z Last attempt: 2026-11-20T13:18:33Z Notes and limitations: Extracted automatically from a single official source (section "Writing integration tests with Copilot"). Related: https://latestn.com/tool/github-copilot/features/write-unit-tests-copilot-chat How do I write unit tests with GitHub Copilot Chat? https://latestn.com/tool/github-copilot/ide-and-apps/accept-partial-suggestions How do I accept only part of a GitHub Copilot suggestion? https://latestn.com/tool/github-copilot/ide-and-apps/ask-questions-in-ide How do I ask GitHub Copilot questions in my IDE? https://latestn.com/tool/github-copilot/features/where-to-use-extensions Where can I use extensions with GitHub Copilot? https://latestn.com/tool/github-copilot/features/write-better-prompts How do I write better prompts for GitHub Copilot? https://latestn.com/tool/github-copilot/features/write-effective-custom-instructions How do I write effective custom instructions for GitHub Copilot code review? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-18T13:15:27Z | changed | test file: — → test_bank_account_integration.py | [1] 2026-11-18T13:15:27Z | changed | approach: — → break down our request for Copilot to write integration tests for the BankAccount class into smaller, more manageable pieces | [1] 2026-11-18T13:15:27Z | changed | improvement prompt: What additional tests should be included to ensure full coverage for the integration between the BankAccount class and the NotificationSystem ? → — | [1] 2026-11-18T13:15:27Z | changed | test file name: test_bank_account_integration.py → — | [1] 2026-11-13T13:05:49Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/github-copilot/features/write-integration-tests-copilot/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/write-integration-tests-copilot POST: https://latestn.com/dispute/tool/github-copilot/features/write-integration-tests-copilot with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/github-copilot/features/write-integration-tests-copilot?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I write integration tests with GitHub Copilot? Revision 2, last verified 2026-11-20T13:18:33Z. https://latestn.com/tool/github-copilot/features/write-integration-tests-copilot (accessed 2026-11-21T09:52:19Z). @misc{LatestN_tool_github_copilot_features_write_integration_tests_copilot_r2, title = {How do I write integration tests with GitHub Copilot?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/github-copilot/features/write-integration-tests-copilot}}, note = {Revision 2; digest sha256:b022e592dd6de508; last verified 2026-11-20T13:18:33Z; accessed 2026-11-21T09:52:19Z} } 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/write-integration-tests-copilot