Using AI Test Class
Written for the Old UI
This article was written for the old UI. The instructions are still usable, but the screenshots are outdated. In some cases, items referenced in the instructions have moved or changed. If you cannot find an item, see the Where Did It Go article.
Overview
This article explains how to use the AI Test Class Creator to automatically generate a Salesforce test class for the selected component. Once generated, you can review and commit the test class as a new component to the branch.
Since deploying components to Salesforce typically requires sufficient test coverage, the AI Test Class Creator helps accelerate test coverage by:
Improving deployment readiness by adding missing test coverage.
Reducing deployment failures caused by insufficient or failing tests.
Standardizing baseline test patterns across teams.
Accelerating delivery by reducing manual test scaffolding effort.
Default AI Limitations
By default, Flosum provides a free shared DeepSeek AI model for DevOps through DeepSeek’s API. Because it is shared across tenants, performance and availability depend on system load and token capacity. During heavy usage, you may see higher latency or temporary errors. To avoid this, you can add your own custom AI model. See the following article.
Best Practices
Review the generated test data setup to ensure it matches your organization’s validation rules and required fields.
Ensure the test class follows your team’s naming conventions and deployment standards.
When possible, commit test classes separately to keep changes easy to review and track.
Using AI Test Class
Create Test Class
Click AI Tools next to Edit.

Click AI Test Class from the dropdown menu.

While the test class is being generated, AI is generating... is displayed.

Review the test class after it is created and make any necessary changes.
Click Commit changes.

Enter a Commit message in the textbox.
Click Commit.

Once created, the new test class is added to the branch as a new component.

Last updated
Was this helpful?

