Software Tests

WEC-Sim includes MATLAB Continuous Integration tests that check the source code’s stability and generate a build report. The continuous integration tests are run each time a commit is made to the WEC-Sim GitHub repository, and the stability of each commit is available via WEC-Sim’s GitHub Actions. Tests are run on both the WEC-Sim main and WEC-Sim dev branches. To ensure stability across MATLAB distributions, WEC-Sim tests are also run on current and prior MATLAB releases. Refer to MATLAB’s unit test framework and continuous integration documentation for more information.

When new features are added, tests should developed to verify functionality. All tests should be run locally to ensure stability prior to submitting a pull request. In order for a pull request to be merged into the WEC-Sim repository it must pass all software tests, refer to Pull Requests.

WEC-Sim Tests

The WEC-Sim tests are located in the $WECSIM/tests directory. To execute the WEC-Sim tests locally and generates a build report, navigate to the $WECSIM directory (e.g. C:/User/Documents/GitHub/WEC-Sim), and type the following command in the MATLAB Command Window:

>> results = wecSimTest()


Totals:
   38 Passed, 0 Failed, 0 Incomplete.

WEC-Sim Applications Tests

The WEC-Sim Applications repository includes tests of each applications case. To execute the WEC-Sim Applications tests locally and generates a build report, navigate to the $WECSIM_Applications directory (e.g. C:/User/Documents/GitHub/WEC-Sim), and type the following command in the MATLAB Command Window:

>> results = wecSimAppTest()


Totals:
   43 Passed, 0 Failed, 0 Incomplete