本文是《Agentforce Testing Center - 代理测试中心》的练习操作步骤。阅读原文请见:Agentforce Testing Center - 代理测试中心。
1. Sign Up for a Developer Edition Org
- Sign up for a free [Developer Edition org with Agentforce Testing Center](https://trailhead.salesforce.com/promo/orgs/agentforce-with-testing-center-for-trailhead).
- Email: enter an active email address.
- Username: enter a unique username that looks like an email address (for example,
yourname@example.com). - Click Sign me up.
- Open the activation email and click Verify Account.
- Set your password and challenge question.
- Connect the org to Trailhead:
- In the Challenge section, click the org name and click Connect Org.
- Enter the username and password for the Developer Edition.
- On the Allow Access? screen, click Allow.
- On the connect-for-hands-on-challenges screen, click Yes! Save it.
2. Turn On Agentforce
- Click the Setup icon, then click Setup.
- In the Quick Find box, search for and select Einstein Setup.
- Verify Einstein is turned On. If it is already On, turn it Off and then back On again.
- Refresh your browser.
- In the Setup Quick Find, search for and select Salesforce Go.
- In the Search features... textbox, enter and select Agentforce (Default).
- Click Get Started.
- Click Turn On.
- Click Confirm.
3. Get the Testing Template
- From Setup, in the Quick Find box, search for and select Testing Center.
- Click New Test.
- For Test Name, enter
template. - Select Einstein Copilot - v1 or Agentforce (Default) - v1 for the agent to test.
- Click Next, then click Next.
- Click the Upload Test Cases tab.
- Click the Template link to download the
testing_template.csvfile. - Close the New Test without saving.
- Open the file in a text editor to review the comma-separated values (Utterance, Expected Subagent, Expected Actions, Expected Response).
4. Run Your Tests
- From Setup, in the Quick Find box, search for and select Testing Center.
- Select New Test.
- For Test Name, enter
Test Agentforce v1. - Select Einstein Copilot - 1 or Agentforce (Default) - 1.
- For Description, enter
Test cases for Agentforce to verify account summaries and details. - Click Next.
- Skip Test Conditions (Context Variables) and click Next.
- Click the Upload Test Cases tab.
- Click Upload Files and select the
testing_template.csvfile. - Click Done, then Next, then Save.
5. Generate Tests with AI (Batch Testing)
- From the App Launcher, search for and select Agentforce Studio.
- Click Tests.
- Click New Suite.
- For Test Name, enter
Generated Test Agentforce v1. - Select Einstein Copilot - 1 or Agentforce (Default) - 1.
- For Description, enter
Test cases for Agentforce to verify account summaries and details. - Click Next, then Next.
- Select Generate Test Cases.
- For Number of test cases, leave it at 20.
- For Test Case Description, enter
Generate realistic inquiries that customers might ask about their user account, orders, and other general questions about products. - For Generate Test Cases From, select Subagents and Actions assigned to the agent.
- Click Next.
- Click Generate Test Cases and wait (refresh the browser if needed).
- Click Run Test.
6. View Test Results
- From the App Launcher, search for and select Agentforce Studio.
- Click Tests.
- Select the Test Suite Generated Test Agentforce v1.
- Click Run history.
- Select the Start Time for the test suite you just ran.
- Review the Subagent Evaluation Pass %, Action Evaluation Pass %, and Response Evaluation Pass %.
- Review the Test Results table (Utterance, Expected vs Actual Subagent/Actions/Response, and Pass/Fail evaluations).
7. Troubleshoot with Agentforce Builder
- From Setup, in the Quick Find box, search for and select Agentforce Agents.
- Select the dropdown for the agent and select Open in Builder.
- In the Conversation Preview, enter the utterance
Please update the email address for Ilsa Galgey to new_email@example.com.and click Enter. - If the agent asks to confirm, click Confirm or enter
Yes. - Review the results (Session Started, User Prompt, Subagent Selected, Action Launched).