nerdexam
Microsoft

GH-300 · Question #23

How can GitHub Copilot be limited when it comes to suggesting unit tests?

The correct answer is B. GitHub Copilot primarily suggests basic unit tests that focus on core functionalities, often requiring. GitHub Copilot is good at generating straightforward unit tests for common, well-defined functions, but it typically falls short on edge cases, complex business logic, stateful interactions, or highly context-specific scenarios. Developers usually need to review, supplement…

Testing with GitHub Copilot

Question

How can GitHub Copilot be limited when it comes to suggesting unit tests?

Options

  • AGitHub Copilot can generate all types of unit tests, including those for edge cases and complex
  • BGitHub Copilot primarily suggests basic unit tests that focus on core functionalities, often requiring
  • CGitHub Copilot can handle any complexity in code and automatically generate appropriate unit
  • DGitHub Copilot's limitations in generating unit tests can vary based on the IDE version you are

How the community answered

(43 responses)
  • A
    5% (2)
  • B
    91% (39)
  • C
    2% (1)
  • D
    2% (1)

Explanation

GitHub Copilot is good at generating straightforward unit tests for common, well-defined functions, but it typically falls short on edge cases, complex business logic, stateful interactions, or highly context-specific scenarios. Developers usually need to review, supplement, and refine the generated tests to achieve meaningful coverage - Copilot does not automatically handle every complexity.

Topics

#GitHub Copilot#Unit Testing#Limitations#Test Generation

Community Discussion

No community discussion yet for this question.

Full GH-300 Practice