A new open-source agent, code-testing-generator, has been introduced to automate the creation of unit tests. This agent is designed to address common challenges in test generation, such as identifying which code requires testing, determining the appropriate test framework, and ensuring tests are correctly integrated into a project's build process. It is available as the dotnet-test plugin within dotnet/skills.
The code-testing-generator agent writes unit tests by isolating the code under test and mocking external services and dependencies. Its current scope is limited to unit tests, excluding integration, end-to-end, browser, and performance tests. Beyond simply making tests pass, the agent verifies assertions, requested scenarios, and confirms that new tests are discoverable by the repository's standard test run.
Before writing tests, the agent learns from the repository by identifying code that needs testing, detecting the language and test framework, and analyzing existing tests for conventions. It also determines the correct commands for building and running tests, preventing issues where new test projects might build but not run in continuous integration. The agent selects from direct, single-pass, or iterative approaches based on the scope of the testing request.
For larger tasks, the agent plans by listing code that requires tests, starting with simpler code and progressing to more complex dependencies. It maps each behavior to a test file, adhering to local conventions. The agent continuously runs tests during its work, automatically fixing compilation errors or incorrect assertions by referencing the source code.
✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →
One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.
One email a day. Unsubscribe in one click, any time.
Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.
▶ Play today's briefNew every morning, and the back catalogue is archived by date.
A new open-source, polyglot agent named code-testing-generator has been released to automate the generation of unit tests. This agent learns from a repository, plans test creation, writes tests, and validates their functionality, including integration into the project's build system.