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
  1. Developer API
  2. Endpoints

/tests

Tests API is for having programmatic test reporting for confidence and/or integration in to your own CI/CD systems.

Previous/projectsNext/process

Last updated 11 months ago

Retrieve tests

Tests for any Swallow pricing project version can be downloaded in bulk for either offline analysis or to run through other CI/CD systems.

{
    tests : [
        ...,
        {
            "id": "jeowtsmk",
            "mocks": {},
            "name": "SL59KXV - Young but experienced in London",
            "key": "sl59kxv_young_but_experienced_in_london",
            "result": {
                "vehicle_make": "NISSAN",
                "vehicle_colour": "RED",
                "vehicle_fuel": "PETROL",
                "vehicle_engine_capacity": "1386",
                "vehicle_manufacture_year": "2009",
                "premium_tax": 56.64,
                "premium_commission": 59.1,
                "result": 509.72,
                "valid": false
            },
            "output": {
                "result": 509.72,
                "valid": false
            },
            "input": {
                "vehicle_reg": "SL59KXV",
                "vehicle_ncd": 6,
                "proposer_dob": "2000-01-01",
                "proposer_postcode": "W53TR",
                "additional_drivers_count": 0
            }
        },
        ...
    ]
}

The result is what the Swallow pricing project calculates. The output is what is expected (this might be generated via offline Excel rater or other pricing tools). If the result and output match, then the project is pricing as expected.

There can be thousands of tests stored against each project version.

Offline pricing analysis

Tests are stored against each project version. This means you have a historic record of how the price has changed based on the test scenarios. You can use this movement to understand how pricing has changed over time.

First fetch all project versions via:

https://api.llow.io/sw/projects/versions?project_reference=56c575d2-b6b9-44ed-9c75-5d705b987ec1

then hit the test endpoint to return all the test cases per project

https://api.llow.io/sw/tests/16c575d2-b6b9-44ed-9c75-5d705b987ec1
https://api.llow.io/sw/tests/26c575d2-b6b9-44ed-9c75-5d705b987ec1
https://api.llow.io/sw/tests/36c575d2-b6b9-44ed-9c75-5d705b987ec1
https://api.llow.io/sw/tests/46c575d2-b6b9-44ed-9c75-5d705b987ec1

You will now have all the information needed to plot pricing changes over time and even pivot via input values.

Running tests

There is no endpoint to run tests as this is all done in the browser. This means the tests must be first run within the platform via the UI as part of the project version changes.

Returns test results for a project version

get
Path parameters
version_referencestringRequired

Project version reference. It is a UUID.

Example: 46c575d2-b6b9-44ed-9c75-5d705b987ec1
Responses
200
/sw/tests/{version_reference} response
application/json
get
GET /sw/tests/{version_reference} HTTP/1.1
Host: api.llow.io
Accept: */*
200

/sw/tests/{version_reference} response

{
  "config": {
    "type": "-",
    "url": "-",
    "method": "-",
    "timeout": "-",
    "frequency": "-",
    "headers": "-",
    "format": "-"
  },
  "tests": [
    {}
  ],
  "saved": [
    {}
  ]
}