/tests

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

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.

Last updated