Integration Test Generation



Overview

vFunction can generate integration tests for your application by combining three things:

  • A vFunction analysis of your application, which provides the architectural context (domains, flows, and dependencies) the tests are based on.
  • The vFunction MCP server, which exposes that analysis to your AI coding assistant as tools.
  • An AI coding assistant such as Claude or Kiro, which uses those tools to write, run, and fix the tests in your repository.

Because the assistant works from vFunction’s understanding of how the application is structured, rather than from the source code alone, the generated tests cover the application’s real domain boundaries. This is useful when a team has tried generating integration tests with a coding assistant by itself and found the results incomplete or hard to scale.


Prerequisites

See the full list of prerequisites.


Steps to Generate Integration Tests

See the full list of steps to generate Integration Tests.


Choosing a Test Framework

By default, vFunction supplies recommended testing frameworks for Java and .NET projects, and the generated prompt uses them. You are not limited to these defaults. If your team uses a different test harness, tell the assistant which one you want and ask it to generate the tests in that framework instead.


What to Expect

After running Generate Integ Test Prompt, you should see:

  • Test classes and methods organized by domain. Each domain identified in your baseline measurement gets its own coverage, so the number of test classes will generally track the number of domains in your analysis
  • Tests written in the recommended framework for your language, or the framework you requested
  • A first test run that mostly passes. It’s normal for a few tests to fail the first time, usually because of environment or runtime issues rather than problems with your application. The assistant can diagnose and fix these
  • A fully passing suite after iteration, along with local and smoke tests that pass

Tips

  • If tests fail, give the assistant the full failure output and let it iterate.
  • Make sure the baseline measurement is current. Tests are only as accurate as the analysis they are based on, so if the application’s architecture has changed significantly, update the analysis and baseline before regenerating tests.
  • If your analysis spans more than one repository, open the repository you want tests for and confirm the selected application and baseline correspond to it.

Troubleshooting

See the full list of troubleshooting steps.