Swallow
  • YOUR FIRST MODEL
    • Setting up your first project
    • Manual setup of a new product
    • Excel Model Upload
    • Create your team
    • Essential concepts
      • Syntax
      • Steps
      • Collections
      • Try Model
      • Spotlight
  • PROCESS
    • Team Management
    • Governance & Collaboration
  • BUILD
    • Building with AI
    • Step builder
      • Understanding step types
      • Ordering step blocks
      • Placeholder mode
      • Up/Downloading models
      • Sharing your model
      • Running tests
    • Inputs
    • Enriching Raw Data
      • Transform Data
      • Enrich via API
      • Data Set
      • Collection
      • Custom Code
    • Setting Up Decisions
      • Exclusions
      • Excesses
      • Endorsements
      • Refer
    • Making Calculations
      • Factors
      • Calculation
    • Outputs
  • TEST
    • Creating New Tests
    • Running Tests
    • Editing Tests
    • Reading & Interpreting Tests
    • Impact Testing
  • DATA
    • Working with real-time data
    • Data Views
    • Data Quotas
    • Troubleshooting
    • API Webhooks
    • Data Downloads
  • ADMIN & SETTINGS
    • Project Management
    • Account Management
  • INTEGRATIONS
    • Introduction
    • Payments
      • Stripe
      • GoCardless
      • Adyen
    • Alerting
      • Slack
      • Zapier
    • Data
      • AWS S3
      • Google Sheets
    • Admin
      • Socotra
      • Guidewire
      • Hubspot
      • Salesforce
  • Developer API
    • Introduction
    • Authentication
    • Errors codes
    • Endpoints
      • /quotes
      • /projects
      • /tests
      • /process
Powered by GitBook
On this page
  • Setting up tests
  • Running tests within the builder
  • Viewing logs
  1. BUILD
  2. Step builder

Running tests

Testing your build as you go with logs and the test scenario dialogue

PreviousSharing your modelNextInputs

Last updated 1 year ago

It's important to be able to gain confidence in your model as you go, which is why you can run tests against your pricing model build, without having to leave the 'Build' tab.

Setting up tests

This page assumes you've automatically created tests at the start of your build by choosing the Building with AI option or by using a Swallow template. If you've started your build from scratch, you'll need to read our page on Creating New Tests to set up tests before you'll have the option to use them.

Running tests within the builder

The 'Run Test Scenario' dialogue box is always at the right-hand side of your step builder.

Simply open the drop-down menu at any time, and you'll see any test scenarios you've added listed.

Learn more about Creating New Tests or Editing Tests if you want to change the tests listed in this menu.

After selecting a specific test, you'll instantly see the impact that your new model has had on the test data. All of the results that you've specified as Outputs will show in the results here.

Viewing logs

You can also dig a little deeper into any results by viewing the logs within your model.

On the 'Build' tab, if you click the 'Show Logs' button, all of your steps will expand to show the logs, so you can see how each result was calculated, split in detail. You can also download all logs as a JSON file.

At any stage in building your model, it's really simple to test your expression before you save it.

Simply click the 'Test' button in the bottom right of any 'Expression' form field, and you'll see either a green tick or a red cross next to a label reading 'View'.

This will tell you whether your syntax is written and parsing correctly or not.

Clicking the 'View' label will open up a debug menu that will show the JSON logs, allowing you to see how your expression is working with default data, to evaluate if it's doing what you expect it to.

Test data will automatically be generated from the 'Default' inputs you've set up in your INPUTS step. When you're editing a step, you can always see the test data or manually update it at any time in the bottom left of your sidebar.

'Run Test Scenario' dialogue
Test Results
Expanded logs for a 'Factors' step
Click the 'Test' button to see if your expression is working
Expression parsing successfully
Expression parsing unsuccessfully
Expanded JSON logs
Test data in the bottom left corner of the sidebar