Running tests
Testing your build as you go with logs and the test scenario dialogue
Last updated
Testing your build as you go with logs and the test scenario dialogue
Last updated
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.
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.
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.
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.