Develop unit tests using GitHub Copilot tools

Intermediate
Developer
GitHub

This module explores using GitHub Copilot and GitHub Copilot Chat to create unit tests. Exercises provide practical experience creating unit test projects and running unit tests in Visual Studio Code.  

Learning objectives

By the end of this module, you're able to:

  • Create unit tests using the GitHub Copilot and GitHub Copilot Chat extensions for Visual Studio Code.

  • Create unit tests that target edge cases and specific conditions using the GitHub Copilot and GitHub Copilot Chat extensions for Visual Studio Code.

  • Use Visual Studio Code, the .NET SDK, and the C# Dev Kit extension to create a test project and verify that your unit tests build and run successfully.

Prerequisites

  • An active subscription for GitHub Copilot is required for either your personal GitHub account or a GitHub account managed by an organization or enterprise.

  • Experience using the GitHub Copilot and GitHub Copilot Chat extensions for Visual Studio Code to generate autocompletion suggestions and explain existing code.

  • One or more years of software development experience is recommended.

  • Experience developing C# applications using Visual Studio Code and the C# Dev Kit extension is recommended.

  • Awareness of the GitHub Copilot free trial conditions. If you choose the free trial offer for GitHub Copilot, a form of payment is requested at sign-up. Charges aren't applied until the trial is over, unless you cancel before the conclusion of the 30-day period.