Steps - Integration Test Generation
- Overview
- Steps to Generate Integration Tests
Overview
For more information about generating Integration Tests, see:
Steps to Generate Integration Tests
Connect to your vFunction environment
- Open your IDE with the application repository loaded
- Using the vFunction extension, connect to the vFunction environment that hosts your analysis
- Authenticate if prompted
Select the application and baseline measurement
- In the vFunction extension, select the application that matches your repository
- Select the baseline measurement for that application. The baseline defines the domains and structure that the tests will be generated against
Install and enable the MCP tools
- Install the vFunction MCP tools for your AI coding assistant
- Confirm the assistant can see the vFunction tools, including Generate Integ Test Prompt
Generate the integration tests
- In your AI coding assistant, invoke the Generate Integ Test Prompt tool for the current repository
- The tool produces a prompt, based on the analysis, that instructs the assistant how to create integration tests. The assistant then acts on that prompt and writes the tests into your repository
- Review the output (see What to Expect)
Run the tests and resolve failures
- Run the generated tests
- If a test fails, give the assistant the failure output and let it diagnose and fix the problem. First-run failures are often environmental, such as a runtime or SDK version mismatch or a configuration issue, and the assistant can usually correct them on its own
- Re-run until the suite passes
Run local and smoke tests
The assistant can also create local tests and smoke tests alongside the integration tests. Run these as well to confirm the application starts and behaves correctly in your local environment.
Review the generated tests
Before building further on the tests, review them to confirm they match your expectations for coverage, naming, and assertions. Generated tests are a strong starting point, but they should be reviewed like any other code.