Creating Custom Tests - Alternative
This section describes how to create Custom Tests using the Developer Console in Vanta
Overview
Custom tests can be created for any connected Integration directly in the Tests page as described in the previous section Creating Custom Tests.
The following example will describe how to create a Custom Test through the Developer Console for a Private Integration. Before moving forward in this guide, ensure you have at least completed the New Application and Application Resources steps. Custom Tests validate your application resources, so those should have already been defined in your Vanta Private Application before proceeding.
Steps
Add a new Test as explained in the Custom Tests section of the My First Connector Guide.
- In the developer console, select your Application, and then click on the Custom Tests tab.
- Select the + Create test button.
- Complete the form by providing a name and a description.
- Select the resource and the form will show the available properties for that resource.
- Select the property from the resource. Based on the type of the selected property, Vanta will show the possible comparison operators and values. See table below for details.
- Select the desired Operator and values for your logic.
- Click Create
It’s very important to define the PASSING condition of your test. Resources that do not match the criteria, will cause the Test to FAIL and when all resources are satisfying the criteria, the TEST will be in an OK status.
Currently Vanta supports 3 types of properties, but this will continue to be enhanced, so check your Vanta instance for the latest available options.
Tests Logic
Property Type | Comparison Operator | Logic | Comparison Value |
---|---|---|---|
Boolean | = | is | True / False |
String | = | equals | Your Value |
String | != | not equals | Your Value |
String | INCLUDES | contains | Your Value |
Integer | = | equals | Your Value |
Integer | != | not equals | Your Value |
Integer | BETWEEN | within range | Your Range |
Integer | > | greater than | Your Value |
Integer | >= | greater or equal than | Your Value |
Integer | < | less than | Your Value |
Integer | <= | less or equal than | Your Value |
Example
New Test
Create a custom test as follows to ensure all emails for the User Accounts resources sent in our example align with company policies following the company name pattern.
Test Identification
Once the test is created, it will be available in the Tests Page in Vanta under the Custom Category.
Test Details
Clicking into the test will provide details of the items to remediate, last refresh, and due dates as expected for any Vanta Test.
In our example we have sent a user account via the API with email as vanta.com, which does not match the expected test logic that the email should contain the string vantapartner.com causing the test to fail.
Congratulations! You have reached the end of the Guide!
Updated 5 months ago