Parasoft extends your AI coding agent with the ability to create unit tests based on coverage information. The query_line_coverage MCP tool analyzes coverage data and identifies uncovered code, enabling AI agents to create unit tests that help maximize code coverage. For details on the query_line_coverage tool, see Configuring the MCP Server Extension for AI Agents.
Creating Unit Tests Example
Prerequisites:
- dotTEST 2026.1 or later is installed with the MCP server.
- AI Agent is configured to use the MCP server.
In the following example, the AI Agent generates unit tests based on coverage data collected after running dottestcli.
- Get a
coverage.xmlfile for your project. The file contains information about covered and uncovered lines of code. - In the AI Agent chat window, ask the LLM to improve your code coverage based on the provided
coverage.xmlfile. - The AI Agent will:
- Use the query_line_coverage tool to process the
coverage.xmlfile and get information about uncovered lines of code. - Add relevant tests to cover the missing lines.
- Use the query_line_coverage tool to process the