GitHub Copilot can speed up coding, testing and reviews when used well. In this lesson you will learn its main features and plans, set it up in VS Code, use practical prompts for test automation, and apply it responsibly.
๐ What You’ll Learn: Copilot features from completions to the coding agent, plans and free options, setup in VS Code, practical prompts for testers, using Copilot with Playwright MCP, Copilot on github.com for PRs and reviews, and responsible use.
๐ค What Is GitHub Copilot?
GitHub Copilot is GitHub’s AI assistant for software work. It suggests code as you type, answers questions in a chat, makes multi-file changes, reviews pull requests and can even work on issues by itself and open a pull request.
| Feature | What it does |
|---|---|
| Code completions | Suggests the next lines or a whole function as you type |
| Copilot Chat | Explains code, writes tests, finds bugs, answers questions about your repository |
| Agent mode (in the editor) | Plans and edits several files, runs commands and iterates until a task is done |
| Copilot coding agent | Assign a GitHub issue to Copilot; it works in the cloud and opens a pull request |
| Copilot code review | Request Copilot as a reviewer on a pull request for automated feedback |
| Pull request summaries and commit messages | Drafts descriptions and messages from your changes |
Copilot works in VS Code, Visual Studio, JetBrains IDEs, on github.com, in the GitHub mobile app and in the terminal.
๐ณ Plans
| Plan | For |
|---|---|
| Copilot Free | Individuals; a limited monthly number of completions and chat requests |
| Copilot Pro / Pro+ | Individuals who need more usage and premium models |
| Copilot Business / Enterprise | Organisations, with policy controls and admin features |
Verified students, teachers and maintainers of popular open-source projects can get Copilot Pro for free. Limits and prices change, so check GitHub’s Copilot plans page for current details.
โ๏ธ Set Up in VS Code
- Install the GitHub Copilot extension (Copilot Chat is included).
- Sign in with your GitHub account and enable a plan (Copilot Free is available to most personal accounts).
- Start typing to see grey suggestions: Tab accepts, Esc dismisses; Alt + ] shows the next suggestion.
- Open the chat with Ctrl + Alt + I (Windows/Linux) or Ctrl + Cmd + I (macOS), and switch between Ask, Edit and Agent modes.
๐งช Copilot for Testers: Practical Prompts
Good prompts are specific about the tool, style and expectations:
| Task | Example prompt |
|---|---|
| Write a test | “Write a Playwright TypeScript test for the login page in LoginPage.ts: valid login, locked-out user and empty fields. Use getByRole and web-first assertions.” |
| Generate test cases | “List boundary and negative test cases for the discount code field (max 10 characters, alphanumeric, case-insensitive).” |
| Create test data | “Generate 10 realistic test users as a TypeScript array matching the TestUser interface.” |
| Explain a failure | “Explain this Playwright error and suggest a fix” (paste the error and code) |
| Refactor | “Refactor this test to use the CartPage page object and remove the waitForTimeout.” |
| Review | “Review this test for flakiness risks.” |
Copilot can also work with Playwright MCP in agent mode to explore a live page before writing tests, similar to Playwright Test Agents.
๐ก Tip: Ask Copilot to follow your project’s patterns: “Use the fixtures in src/fixtures/index.ts and the existing page objects.” Open the relevant files first; Copilot uses open files and your repository as context.
๐ Copilot on GitHub.com
- Pull request summaries: click the Copilot icon in the PR description box to draft a summary (pull requests).
- Code review: add Copilot as a reviewer; it leaves comments and suggestions like a human reviewer (code review).
- Coding agent: assign an issue to Copilot; it pushes commits to a new branch and opens a draft PR for you to review. Treat it like a junior teammate: review everything before merging.
โ ๏ธ Using Copilot Responsibly
- Review every suggestion. AI can produce code that looks right but is wrong, insecure or outdated (for example deprecated APIs or hard waits in tests).
- Run the tests. Generated tests must pass, fail when the feature breaks, and be readable.
- Protect secrets and private data. Do not paste credentials or customer data into prompts.
- Respect licences and policies. Organisations can block suggestions matching public code and set policies for which features are allowed.
- You own the result. Copilot is an assistant; the author and reviewers remain responsible for what is merged.
๐ Assignment
- Enable Copilot (Free or another plan) in VS Code.
- Ask Copilot Chat to explain a test file from your Playwright project.
- Generate a new Playwright test with a detailed prompt, run it, and fix anything wrong.
- Ask for boundary and negative test cases for a form field and compare them with your own list.
- Use Copilot to draft a commit message and a PR description, then edit them to follow Conventional Commits.
- Bonus: request a Copilot code review on a pull request and decide which comments to accept.
โ FAQ
๐ค What is GitHub Copilot?
An AI assistant from GitHub that suggests code, answers questions in chat, edits files in agent mode, reviews pull requests and can work on assigned issues.
๐ค Is GitHub Copilot free?
There is a Copilot Free plan with limited monthly usage, and free Copilot Pro for verified students, teachers and popular open-source maintainers. Other plans are paid.
๐ค Can GitHub Copilot write Playwright tests?
Yes. With specific prompts and your page objects open as context, it can draft Playwright TypeScript tests, which you must review and run.
๐ค Can Copilot review pull requests?
Yes. You can request Copilot as a reviewer on a pull request to get automated review comments.
๐ค Is it safe to use Copilot at work?
Follow your organisation’s policies, review all output, avoid sharing secrets, and use business plans with admin controls where required.
๐ฏ Next Steps
- ๐๏ธ Project 1: Team Collaboration Workflow Simulation
- ๐ค AI Tools for QA Engineers
- ๐ Git and GitHub Tutorial: full course
๐ฌ Learn Git and GitHub step by step: watch the series on YouTube!
Subscribe to SqaToolsByDY • Practice on sqatools.in