<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/today-i-will-improve-test-coverage-9ytnrgshc" -->

---
title: Today I will… improve test coverage | daily.dev
description: A walkthrough of improving test coverage in a sample .NET application (Interview Coach) using Visual Studio's Code Coverage analysis alongside GitHub Copilot's...
canonical: https://daily.dev/posts/today-i-will-improve-test-coverage-9ytnrgshc
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Today I will… improve test coverage | daily.dev
og:description: A walkthrough of improving test coverage in a sample .NET application (Interview Coach) using Visual Studio's Code Coverage analysis alongside GitHub Copilot's...
og:url: https://daily.dev/posts/today-i-will-improve-test-coverage-9ytnrgshc
og:image: https://api.daily.dev/og/posts/9ytnrgshc.png
og:image:alt: Today I will… improve test coverage
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Today I will… improve test coverage

**[DevBlogs](https://daily.dev/sources/devblogs)** · 3 min read · 2 upvotes · 1 comments

## Summary

A walkthrough of improving test coverage in a sample .NET application (Interview Coach) using Visual Studio's Code Coverage analysis alongside GitHub Copilot's Test Agent. The author first baselines coverage with the Analyze Code Coverage tool, then uses Copilot's Test Agent to generate unit tests for a single class, and finally runs the agent across the whole solution with the #solution context, raising coverage from 37% to 81% and adding tests to three previously untested projects.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://devblogs.microsoft.com/visualstudio/today-i-will-improve-test-coverage>

## Questions this post answers

### How can I use GitHub Copilot to generate unit tests for an entire solution instead of one file at a time?

Use the Copilot Test Agent with the #solution context by typing '@test #solution' in the chat, which tells the agent to analyze all projects and code paths in the solution rather than a single class. In one example this raised test coverage from 37% to 81%, adding tests across the repository layer, DbContext, extension methods, and three previously untested projects, while skipping files like plain enums that have nothing to test.

_daily.dev surfaces workflow tips like this for developers automating test coverage with Copilot._

### How do I find which parts of my codebase lack test coverage in Visual Studio?

Run 'Analyze Code Coverage for All Tests' from the Command Palette (Ctrl+Shift+P) or the Tests menu to generate a baseline coverage report showing gaps by project and class. This helps prioritize where to write tests instead of adding them arbitrarily, and can reveal projects with zero tests at all, such as a data-access project referenced in one coverage analysis.

_Developers prioritizing test-writing effort can track coverage tooling tips on daily.dev._

## Community discussion

Top comments from developers on daily.dev.

**@nark3d** · 0 upvotes

> 37% baseline before touching the agent is hard, because the number is what tells you whether the generated tests are finding anything.  What did Copilot's Test Agent do with the three projects that had no tests at all, given it only had coverage data to work from for the rest?  How did the tests it wrote there behave, since an agent with no baseline has nothing to chase and the tests it writes are the ones most likely to pass for the wrong reason.

## Similar posts on daily.dev

- [Supercharge Your Test Coverage with GitHub Copilot Testing for .NET](https://daily.dev/posts/supercharge-your-test-coverage-with-github-copilot-testing-for-net-hrijkvv9w) · .NET Blog · 0 upvotes · 0 comments
- [GitHub Copilot Testing for .NET Brings AI-powered Unit Tests to Visual Studio 2026](https://daily.dev/posts/github-copilot-testing-for-net-brings-ai-powered-unit-tests-to-visual-studio-2026-sj5p2ksw8) · ASP.NET Blog · 0 upvotes · 0 comments
- [Visual Studio adds GitHub Copilot unit testing for C\#](https://daily.dev/posts/visual-studio-adds-github-copilot-unit-testing-for-c--1aw5utjhe) · InfoWorld · 1 upvotes · 0 comments

---

Tags: [#testing](https://daily.dev/tags/testing), [#github](https://daily.dev/tags/github), [#c#](https://daily.dev/tags/c#), [#visual-studio](https://daily.dev/tags/visual-studio)

[View this post on daily.dev](https://daily.dev/posts/today-i-will-improve-test-coverage-9ytnrgshc)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Today I will… improve test coverage","url":"https://daily.dev/posts/today-i-will-improve-test-coverage-9ytnrgshc","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/today-i-will-improve-test-coverage-9ytnrgshc"},"datePublished":"2026-09-15T16:01:26.496Z","dateModified":"2026-09-15T16:01:46.964Z","description":"A walkthrough of improving test coverage in a sample .NET application (Interview Coach) using Visual Studio's Code Coverage analysis alongside GitHub Copilot's...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/4c689c018c2e689797eea44326f60a59?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/4c689c018c2e689797eea44326f60a59?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"DevBlogs","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"DevBlogs","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/8f68b453325f482ebeb73fb780092713","url":"https://daily.dev/sources/devblogs"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/today-i-will-improve-test-coverage-9ytnrgshc","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"testing,github,c#,visual-studio","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"DevBlogs","item":"https://daily.dev/sources/devblogs"},{"@type":"ListItem","position":3,"name":"Today I will… improve test coverage"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/today-i-will-improve-test-coverage-9ytnrgshc","comment":[{"@type":"Comment","text":"37% baseline before touching the agent is hard, because the number is what tells you whether the generated tests are finding anything.  What did Copilot’s Test Agent do with the three projects that had no tests at all, given it only had coverage data to work from for the rest?  How did the tests it wrote there behave, since an agent with no baseline has nothing to chase and the tests it writes are the ones most likely to pass for the wrong reason.","datePublished":"2026-09-21T16:24:54.093Z","url":"https://daily.dev/posts/9ytnrgshc#c-jyNO1ulIS","author":{"@type":"Person","name":"Adam","url":"https://daily.dev/nark3d","image":"https://avatars.githubusercontent.com/u/2162621?v=4"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/today-i-will-improve-test-coverage-9ytnrgshc#faq","mainEntity":[{"@type":"Question","name":"How can I use GitHub Copilot to generate unit tests for an entire solution instead of one file at a time?","acceptedAnswer":{"@type":"Answer","text":"Use the Copilot Test Agent with the #solution context by typing '@test #solution' in the chat, which tells the agent to analyze all projects and code paths in the solution rather than a single class. In one example this raised test coverage from 37% to 81%, adding tests across the repository layer, DbContext, extension methods, and three previously untested projects, while skipping files like plain enums that have nothing to test. daily.dev surfaces workflow tips like this for developers automating test coverage with Copilot."}},{"@type":"Question","name":"How do I find which parts of my codebase lack test coverage in Visual Studio?","acceptedAnswer":{"@type":"Answer","text":"Run 'Analyze Code Coverage for All Tests' from the Command Palette (Ctrl+Shift+P) or the Tests menu to generate a baseline coverage report showing gaps by project and class. This helps prioritize where to write tests instead of adding them arbitrarily, and can reveal projects with zero tests at all, such as a data-access project referenced in one coverage analysis. Developers prioritizing test-writing effort can track coverage tooling tips on daily.dev."}}]}
```

