Tests
Create, manage, import, and export the tests that check Sagent's answers.
Tests is where you define what a good Sagent answer looks like. Each test pairs a shopper message with the checks Sagent's answer must pass, so you can rerun the same expectations after every change.
The Tests overview
Open QA → Tests to see every test for this Sagent.
Test
The test name in bold, with the shopper message underneath. Conversation tests also show a Conversation chip with the number of messages.
Checks
The checks the answer must pass.
Last result
Passed or Failed, with the time of the most recent run that included the test. Blank if the test hasn't run yet. Marked Outdated if you've changed the test since.
On/Off
Whether the test is included in your next run.
Use the toolbar to find tests quickly:
Search tests finds tests by name or message.
Last result filters by All, Failed, Passed, or Not run.
On/Off filters by whether tests are switched on.
Open the menu at the end of a row to Edit, Duplicate, or Delete a test.
Crobox system checks appear as a separate, collapsed group: Crobox system checks: included in every run. Open a check to see what it tests. They're managed by Crobox and can't be changed here.
Create a test
Add an expected answer (optional)
Describe what a great answer would say in Expected answer. When you fill this in, QA adds a Matches expected answer check automatically, which checks that the facts in Sagent's answer match yours. The check is locked in place for as long as Expected answer is filled in.
Choose your checks
The check list shows the most common checks first. Open More checks for the rest.
Meets criteria
Sagent's answer does what you describe in plain language.
Criteria
Matches expected answer
The facts in Sagent's answer match your expected answer. Added automatically when Expected answer is filled in.
From Expected answer
Asks a follow-up question
Sagent asks for more detail before recommending.
None
Shows products
Sagent recommends products.
None
Doesn't contain text
The answer never includes specific words, like competitor names.
Text
Politely declines
Sagent refuses off-topic or unsafe requests.
None
More checks
Contains text
The answer includes specific words, like a brand name.
Text
Stays on the question
The answer is relevant to the shopper's message.
None
Matches pattern
The answer matches a regular expression. For technical users.
Pattern
Doesn't match pattern
The answer doesn't match a regular expression, for example to block prices or links.
Pattern
No harmful content
Flags violent, explicit, or harmful answers.
None
Text checks ignore case by default. Switch on Match case on a Contains text or Doesn't contain text check when capitalization matters, for example to require a brand name written exactly as Osprey.
Write strong criteria
Meets criteria is the most flexible check, so it pays to write criteria carefully:
Describe behavior you can observe. Recommends at least one multi-day pack under €200, or says clearly that none fit the budget is easier to judge than Gives a good answer.
Keep each check focused. Use separate checks for separate conditions, so the result tells you exactly what went wrong.
Combine checks. For a vague request, pair Asks a follow-up question with Meets criteria. For a recommendation, pair Shows products with Meets criteria.
Switch tests on or off
Only tests that are switched on run when you click Run tests. Switch a test off to keep it for later without including it in runs. Its last result stays visible in the overview.
Import and export tests
Use CSV files to build or update many tests at once in a spreadsheet, or to share your test suite for review. Import and export cover single-message tests only. Conversation tests can't be imported and are skipped on export.
Export tests
Click Export on the Tests overview. You get a CSV of every single-message test that matches your current search and filters, across all pages, in the same format Import reads.
CSV format
Each row is one check. A test with three checks spans three rows.
id
No
The test's ID. Rows with the same id update that test. Leave empty to create a new test.
name
Yes
The test name. Rows without an id that share a name become one new test.
shopper_message
Yes
The message Sagent answers.
expected_answer
No
What a great answer would say. When filled in, Sagent's answer is also checked against it.
check_type
Yes
The check's name, such as Meets criteria. Names ignore case and extra spaces.
check_value
Depends
The criteria, text, or pattern for checks that need one. Leave empty for checks without a value.
on
No
on or off. Also accepts true/false, yes/no, and 1/0. If empty, an existing test keeps its current state and a new test is switched on.
Checks that need a check_value:
Meets criteria: criteria
Contains text and Doesn't contain text: text
Matches pattern and Doesn't match pattern: pattern
The Matches expected answer check doesn't get its own row. Fill in the expected_answer column instead, and the check is added automatically.
Match case in a CSV
The names Contains text and Doesn't contain text always ignore case. To switch on Match case, write contains or not-contains as the check_type instead. Exports use these values for any check with Match case switched on, so they import back unchanged.
Example file creating two new tests, one with two checks:
Import tests
Keep these rules in mind:
Imported checks replace existing ones. When a row updates a test, that test's checks are replaced by the checks in the file.
Up to 300 new or changed tests per import. Tests the file leaves unchanged don't count, and a test can span several rows.
All or nothing. If any row has an error, the whole import is cancelled.
Frequently asked questions
Last updated
Was this helpful?
