GH-300 · Domain 5 of 6

GH-300 Domain 5: Improve developer productivity with GitHub Copilot

This domain covers the everyday work Copilot speeds up: generating, refactoring and documenting code, learning unfamiliar codebases, creating sample data, modernizing legacy code, writing unit and integration tests, finding edge cases and suggesting security and performance improvements.

Exam weight
10–15%
Official functional groups
2
Estimated questions estimate
6–9
Suggested study time estimate
6–10 hrs

About 10 min read Reviewed October 2026

Overview

Improve developer productivity with GitHub Copilot is about applying Copilot to real development tasks. It has two official groups. Enhancing productivity and code quality covers using Copilot for code generation, refactoring and documentation, accelerating learning and reducing context switching, and generating sample data and modernizing legacy code. Supporting testing and security covers generating unit and integration tests, identifying edge cases and writing assertions, and suggesting security improvements and performance optimizations.

Scenarios usually name a task and ask which Copilot approach fits. Examples include using Chat to explain an unfamiliar module instead of switching to a browser, asking Copilot to translate a COBOL or legacy Java routine into a modern language, generating realistic but fake test data, or using the /tests command to create tests. The August 2026 update left this domain unchanged.

How it's tested

Productivity questions on GH-300 describe a development task and ask how Copilot can help, or which approach gives the best result safely. Expect test generation, legacy modernization, documentation and learning scenarios, with distractors that skip review, trust passing tests or misuse real data.

  • Pick the approach

    A task such as documenting a module or modernizing legacy code is described, and you choose the Copilot feature or command that fits.

  • Test quality

    Generated tests are described, and you choose how to add edge cases, assertions or integration coverage that actually catch defects.

  • Safe acceleration

    A team wants speed with sample data or security fixes, and you choose the option that keeps privacy and verification intact.

Reasoning it through

A team asks Copilot to generate unit tests for a discount function, and all tests pass immediately. One option merges them, another asks Copilot for edge cases such as zero, negative and very large amounts with explicit assertions on expected results. Tests that only mirror current behavior can hide bugs, so prompting for edge cases and asserting expected outcomes is the stronger choice.

Functional groups 2

Official functional groups from the GitHub (Microsoft) outline, in outline order.

5.1 Enhance productivity and code qualityCode generation, refactoring, documentation, learning, sample data and legacy modernization.
What it means
This group covers three official skills: use Copilot for code generation, refactoring and documentation; accelerate learning and reduce context switching; and generate sample data and modernize legacy code.
What to understand
Copilot generates boilerplate and functions from comments or prompts, proposes refactors such as extracting methods or simplifying logic, and writes docstrings, README sections and comments. Chat explains unfamiliar code, APIs and error messages inside the editor, which reduces switching to browsers or documentation. It can produce synthetic sample data in a required shape and help translate or update legacy code, such as moving old syntax to current language versions, with tests to confirm behavior is preserved.
How it shows up
Expect a task and a choice of Copilot approach, often with a distractor that skips verification or uses real data.
Common confusion
Treating modernization as a one-step translation; behavior must be confirmed with tests before and after the change.
5.2 Support testing and securityUnit and integration tests, edge cases and assertions, security and performance suggestions.
What it means
This group covers three official skills: generate unit and integration tests, identify edge cases and write assertions, and suggest security improvements and performance optimizations using Copilot.
What to understand
Copilot can scaffold unit tests with the /tests command or a prompt, propose integration tests that exercise components together, and suggest edge cases such as empty input, boundaries, nulls and invalid types. Good tests assert expected results from requirements rather than echoing current output. Copilot can also explain vulnerabilities, propose fixes such as parameterized queries or input validation, and suggest faster algorithms or fewer database calls, which developers should verify with profiling and security tools.
How it shows up
Look for the option that adds meaningful edge cases and assertions, or verifies a security or performance suggestion.
Common confusion
Assuming generated tests are correct because they pass; they may encode existing bugs as expected behavior.

High-yield concepts

The terms, rules and formulas this domain turns into questions most often.

  • /tests

    A Chat slash command that generates tests for selected code.

    Remember
    Review and extend what it produces.
    Tested as
    Command selection questions.
    Trap
    Merging generated tests unreviewed.
  • /explain

    A Chat command that explains selected code.

    Remember
    Useful for learning unfamiliar code.
    Tested as
    Learning and context switching.
    Trap
    Using a web search instead.
  • /fix

    A Chat command that proposes fixes for problems in code.

    Remember
    Verify the fix with tests.
    Tested as
    Debugging scenarios.
    Trap
    Assuming the fix is correct.
  • /doc

    A command for generating documentation comments in supported IDEs.

    Remember
    Keeps docs close to code.
    Tested as
    Documentation tasks.
    Trap
    Skipping review of generated docs.
  • Refactoring

    Restructuring code without changing behavior.

    Remember
    Tests confirm behavior is unchanged.
    Tested as
    Code quality questions.
    Trap
    Changing behavior while refactoring.
  • Synthetic sample data

    Realistic but fake data generated for testing.

    Remember
    Never use real personal data.
    Tested as
    Sample data questions.
    Trap
    Copying production records.
  • Legacy modernization

    Updating or translating old code to current languages and frameworks.

    Remember
    Use tests to lock behavior first.
    Tested as
    Modernization scenarios.
    Trap
    Translating without verification.
  • Edge cases

    Boundary and unusual inputs that often expose bugs.

    Remember
    Ask Copilot to list them explicitly.
    Tested as
    Test quality questions.
    Trap
    Testing only the happy path.
  • Assertions

    Checks that compare actual results with expected ones.

    Remember
    Derive expectations from requirements.
    Tested as
    Test quality questions.
    Trap
    Asserting whatever the code returns.
  • Integration tests

    Tests that exercise several components together.

    Remember
    Complements unit tests.
    Tested as
    Test type questions.
    Trap
    Confusing them with unit tests.
  • Security suggestions

    Copilot proposals to remove vulnerabilities.

    Remember
    Confirm with scanning and review.
    Tested as
    Security scenarios.
    Trap
    Treating them as a full security audit.

Side by side

Concepts candidates mix up, compared on the point that decides the answer.

Unit vs. integration tests with Copilot

ConceptMeaningKey differenceCommon trap
Unit test Checks one function or class in isolation Mocks dependencies Testing several services at once
Integration test Checks components working together Uses real or realistic interactions Mocking away the integration
Edge case test Targets boundaries and unusual inputs Finds hidden defects Covering only typical input

Copilot Chat commands for productivity

ConceptMeaningKey differenceCommon trap
/explain Explains selected code Learning, not changing Expecting code edits
/fix Proposes a fix for a problem Changes code Skipping verification
/tests Generates tests Creates test code Accepting tests unreviewed
/doc Generates documentation comments Adds docs Assuming docs are accurate

Exam traps

Each trap is an answer that looks right. Learn the clue that should change your mind.

  1. Passing tests are good tests

    What candidates pick
    Accept generated tests because they all pass.
    Why it looks right
    Green tests look like success.
    Why it's wrong
    Tests that mirror current output can encode existing bugs; assertions should come from requirements and include edge cases.

    Clue to watch for Every generated test passes on the first run.

  2. Real data is better sample data

    What candidates pick
    Paste production records so Copilot builds realistic fixtures.
    Why it looks right
    Real data seems most accurate.
    Why it's wrong
    It exposes personal data in prompts; ask Copilot to generate synthetic data matching the schema instead.

    Clue to watch for The scenario mentions customer or personal information.

  3. Translate and ship

    What candidates pick
    Convert legacy code with Copilot and deploy it directly.
    Why it looks right
    Copilot handles syntax well.
    Why it's wrong
    Modernization can change behavior subtly, so capture current behavior with tests and compare before and after.

    Clue to watch for Legacy code with little documentation or tests.

  4. Copilot replaces security tools

    What candidates pick
    Rely on Copilot's suggestions as the security review.
    Why it looks right
    It can spot and fix vulnerabilities.
    Why it's wrong
    Suggestions help, but code scanning, dependency checks and human review are still needed to verify security.

    Clue to watch for The goal is assurance before release.

  5. Leave the IDE to learn

    What candidates pick
    Search the web to understand an unfamiliar module.
    Why it looks right
    It is a habit.
    Why it's wrong
    Copilot Chat can explain selected code and APIs in the editor, which reduces context switching.

    Clue to watch for The scenario stresses staying focused in the editor.

  6. Unit tests cover integration

    What candidates pick
    Use mocked unit tests to verify two services work together.
    Why it looks right
    Unit tests are familiar.
    Why it's wrong
    Mocks hide integration behavior; integration tests are needed to check components interacting.

    Clue to watch for The defect appears only when services communicate.

Answer framework

Use these steps when a GH-300 question asks how Copilot should help with a development task.

  1. Classify the task as generation, refactoring, documentation, learning, sample data, modernization, testing or security and performance improvement.
  2. Pick the matching Copilot approach, such as inline suggestions for generation, /explain for learning, /tests for tests and /doc for documentation.
  3. For sample data or prompts, make sure no real personal or secret data is involved and ask for synthetic data in the required shape.
  4. For tests, require edge cases and assertions based on requirements, and add integration tests when components interact.
  5. Verify the result: run tests, profile performance changes, scan security fixes and review the code before merging, because Copilot output is a draft you still own.

Practice question

A team must modernize a poorly documented legacy billing module with Copilot's help. Few tests exist, and the business requires identical calculations after the change. What should the team do FIRST?

Choose one answer

Want more like this? The GH-300 practice test has questions for every domain.

Checklist

0 of 11

Tick each one you can do without notes. Your ticks stay in this browser.

Study strategy

Prepare for this domain by using Copilot on real tasks in a practice repository. Pick a small project and work through each official skill: generate a function from a comment, refactor a messy method, document a module, ask Chat to explain unfamiliar code, and create synthetic sample data from a schema.

Next, spend most of your time on testing. Use /tests on a few functions, then ask Copilot for edge cases and rewrite the assertions so they reflect requirements rather than current output. Add one integration test that exercises two components together. Keep notes on what Copilot did well and what you had to correct, since exam options often hinge on that review step.

Then try modernization: take a short legacy snippet, write tests that capture its behavior, and ask Copilot to update it in small steps. Finally, ask Copilot to review code for vulnerabilities and performance issues, and compare its suggestions with a code scanning tool or profiler. Microsoft Learn's Copilot modules on testing and productivity follow these same tasks. Use practice questions to check you reliably choose answers that pair speed with verification.

FAQ

How much of GH-300 is Domain 5, Improve developer productivity with GitHub Copilot?

Improve developer productivity with GitHub Copilot is 10–15% of the exam, about six to nine questions.

Which Chat commands matter most for this domain?

Know /explain for understanding code, /fix for proposed fixes, /tests for generating tests, and /doc for documentation comments where the IDE supports it.

Can Copilot write integration tests as well as unit tests?

Yes. You can prompt Copilot for tests that exercise several components together, but you need to supply context about how they interact.

How should I use Copilot for sample data?

Ask it to generate synthetic data matching your schema and constraints. Do not paste real customer or personal records into prompts.

Can Copilot help modernize legacy code?

Yes. It can explain and translate old code, but you should capture current behavior in tests first and modernize in small, verified steps.

Do Copilot security suggestions replace code scanning?

No. They help find and fix issues, but you should still run security scanning, dependency checks and review before release.

Other Artificial Intelligence & Machine Learning certifications

Where the same subject shows up in other exams. Cards marked "Same subject" open the matching domain.

Test your Domain 5 knowledge

You have covered code generation, refactoring, documentation, learning, sample data, modernization, tests and security suggestions. Test whether you can choose the fast and safe option.

Keep going