calstar / SIL

Software-in-the-loop simulator for rockets
4 stars 2 forks source link

Testing suite #4

Open jaren opened 5 years ago

jaren commented 5 years ago

Add a suite of tests in JSON / DSL with fuzzing, etc.

leoadberg commented 5 years ago

The test JSON should take in a sim file and assert stuff for various types of failures. For example:

{
    "sim": "config/simulations/testsim.json",
    "tests": [
        {
            "name": "normal",
            "failures": [],
            "assertions": [
                "max_height > 500",
                "landing_speed < 10",
            ]
        },
        {
            "name": "altimeter_fail",
            "failures": [
                "altimeter_zero"
            ],
            "assertions": [
                "max_height > 500",
                "landing_speed < 10",
            ]
        }
    ]
}

Though feel free to make any changes necessary. Also probably figure out an actually workable way to do assertions and stuff.

jaren commented 5 years ago

Assertions are done