SKILL Test Framework#

The Test module defines a testing framework modelled after the Python PyTest tool.

  • The built-in assert is used for testing

  • test function names start with ‘test_’

  • Test setup fixtures are defined with input parameters.

  • Additional Test setup fixtures can be added to the Test->Fixtures table.

The Test->Run function should be called at the end of each test script so the tests run when the script is loaded. Each test case is defined as a function that uses the built-in assert statement to test the code. A function is considered passing if it doesn’t throw an error.

The Test->RunDirectory(test_dir_path) function will run all the test scripts in a directory and report the results of them all.

The testing framework also includes test setup fixtures which can be called by adding the name of the fixture function to a test case:

Additional test fixtures can be added by adding them to the Test->Fixtures table: