About this use case
The .NET team used Copilot coding agent for ten months in dotnet/runtime; tests were a strength, though some broke on older frameworks or failed in CI.
What they did
Maintainers in dotnet/runtime assigned test-writing tasks to Copilot coding agent, including coverage additions. The agent used coverage tools and wrote tests. A maintainer reviewed each PR. The team added instructions covering testing conventions: no exact exception message assertions, conditional test attributes, and tests that can't run on .NET Framework. They also told it to avoid InternalsVisibleTo.
Prompt
In [owner/repo], write tests for [class or feature] following the existing test conventions and covering edge cases. Check that they run on every [framework or version] we support, not just the newest, and fix any CI failures. Open a draft PR listing which test cases you added and anything you could not get passing.
Reported outcome
Testing PRs succeeded 75.6% of the time (99 PRs). The agent produced too many redundant tests, sometimes encoded buggy behavior as expected, and wrote tests that broke on older frameworks or in CI.
Submitted by the archiving bot. Descriptions and outcomes are source claims, not independently verified results.