Skip to main content

Code reviews rule: Untested Agentforce topic

Written by David Martin
Updated this week

Untested Agentforce topic

Why is this an issue?

Agentforce topics without automated tests may not route queries correctly:

  • Topics may be selected for inappropriate queries

  • Instructions may not produce expected results

  • Changes to topics can introduce regressions

  • Agent behavior becomes unpredictable

Examples

Example of incorrect setup:

An Agentforce topic deployed without any test coverage in Agentforce Testing Center.

Example of correct setup:

Each Agentforce topic requires validation with at least one test case that includes at least one assertion to verify the topic's behavior in Agentforce Testing Centre.

How can I fix violations?

  1. Create topic tests: Use Agentforce Testing Center to test topic routing.

  2. Test activation criteria: Verify topics activate for correct queries.

  3. Test negative cases: Ensure topics don't activate for unrelated queries.

  4. Validate instructions: Test that topic instructions produce correct outputs.

Resources

Did this answer your question?