After setting up a Custom Connection and submitting data, you can create custom tests to validate that data and link it to your controls. This guide walks you through the full lifecycle: building a test, reviewing results, managing exceptions, and mapping to controls.
Create a Custom Test
Go to the Monitoring tab.
This is where all custom tests associated with your Custom Connections are displayed.Select Create test.
Enter a name and description for your test. Choose something clear and descriptive, especially if you plan to run multiple tests against the same data source.
In the Test Builder, configure your logic:
Category: Select
Custom
Provider: Enter the name of your custom connection
Condition Group: Choose the resource (your data source) and define attributes for the test (e.g.,
hasMFA = true
)
💡 If your dataset includes complex nested arrays, you may need to use the Advanced Editor to write custom test logic.
Save the test.
It will be saved as a draft until you’re ready to publish.
Run or Publish the Test
You can run a draft test at any time to preview its behavior.
Go to the Monitoring page (or the Monitoring tab of your specific Custom Connection).
Use filters to find your test:
Custom (Draft) – tests not yet published
Custom (Published) – tests actively monitored
Select your draft test and run it manually to view the results.
When ready, publish and run the test to include it in monitoring and evidence collection.
Learn more about Drata's Monitoring or Custom Tests.
View and Mange the test results
On the Monitoring page, select the desired custom tests.
Under the Last test result, select View event to verify event tracking details and raw evidence.
To exclude a record from future tests.
Select the record.
Choose the Exclude option.
To learn more about exclusions, go to Exclusions.
Link Tests to Controls
You can map a custom test to your controls.
In the test drawer, scroll to the Control info section.
Select Map controls to link the test to one or more controls.
To learn more, go to Mapping Tests and Controls.