Clientell AI

Run Apex Tests

Use Cases:

    Troubleshoot

    Prompt

    Run all Apex tests in my org and show me any failures with the class name, method, and error message.

    Related use cases

    Debug a Salesforce Error

    Paste an error. Get the root cause in seconds.

    “Apex error ‘FIELD_CUSTOM_VALIDATION_EXCEPTION’ on saving Opportunity — identify which validation rule fired and why.”

    FIELD_CUSTOM_VALIDATION_EXCEPTION
    Object: Opportunity
    Action: Save record
    Root Cause
    Rule: Require_Amount
    Amount must be > 0 when Stage ≠ Prospecting
    Set Amount > 0 or change Stage to Prospecting
    1 validation rule identified

    Find Slow Queries Fast

    Surface queries over 5s and their caller in one prompt.

    “Identify queries in the last 24 h whose execution time > 5 s and list caller (flow, apex).”

    Slow QueriesLast 24h
    QueryTimeCaller
    SELECT * FROM Lead...8.2sFlow
    SELECT Account...6.5sApex
    SELECT Opp WHERE...5.1sFlow
    3 queries > 5sThreshold: 5s
    Multi-step

    Generate an Apex Test Class

    Auto-generate test coverage for any Apex class.

    “Generate a test class for the AccountService Apex class with positive, negative, and bulk test methods targeting 85%+ coverage.”

    AccountServiceTest.cls
    1
    @isTest
    2
    class AccountServiceTest {
    3
      testPositive()
    4
      testNegative()
    5
      testBulk()
    6}
    3 methods · auto-generatedTarget: 85%+