Guidance

prancer is a cloud validation framework using for cloud governance

Step 6 - Run and view the reports

Now that we have a project with a snapshot and a test, we can run the tool and check out the results:

prancer container1

This will generate a bit of content in the console but if you execute:

echo $?

You should see a return value of 0 hopefully, meaning that the test did work fine. If you get anything else such as 1, this probably means you have not properly configured your structure file, snapshot file or test file. Check the documentation on how to properly configure everything or seek help from the community.

If you do get a 0, then you should see a output-test.json in the validation/container1 directory. If you open this, you should see something like this:

{
    "fileType": "output",
    "timestamp": 1551281031487,
    "snapshot": "snapshot.json",
    "container": "testcontainer",
    "test": "test.json",
    "results": [
        {
            "result": "passed",
            "snapshots": [
                {
                    "id": "1",
                    "path": "/resourceGroups/xyz/providers/Microsoft.Network/virtualNetworks/abc",
                    "structure": "azure",
                    "source": "azureConnector"
                }
            ],
            "testId": "1",
            "rule": "exist({1}.location)"
        },
        {
            "result": "passed",
            "snapshots": [
                {
                    "id": "1",
                    "path": "/resourceGroups/xyz/providers/Microsoft.Network/virtualNetworks/abc",
                    "structure": "azure",
                    "source": "azureConnector"
                }
            ],
            "testId": "2",
            "rule": "{1}.location='eastus2'"
        }
    ]
}

This shows that all of your tests passed properly, or if one of the 2 tests failed, it will show you which one and you can easily troubleshoot from there.

Suggest Edit