-
Notifications
You must be signed in to change notification settings - Fork 41
Unit testing suites
Two unit test suites exist within SasView, one to test the calculations performed in the sascalc package and another to test the GUI behavior in the qtgui package. The sascalc unit tests are housed in the test package in the base directory of SasView. Unit tests are housed within each subpackage of the qtgui package within a directory named 'UnitTesting'.
A successful sasview build requires the sascalc unit tests are all successful. Currently, the qtgui tests are checked during the build, but 100% success is not required. Any new content should have new tests to verify the expected behavior of the content and those new tests should pass. Any existing tests that are currently succeeding should continue to pass, but tests that are currently failing can remain the way they are.
Unit tests for the sascalc package are held within the /test/ directory in the base directory of the sasview repository. Each subdirectory in the test directory houses tests specific to each subpackage in sascalc. There are two scripts available to run the unit tests, one that runs the entire test suite and another that runs all tests in a specific test file.
To run all tests from the base sasview directory: python test\utest_sasview.py
To run a single test package from the base sasview directory: python test\run_one.py <test_package>
. The test_package
can be either an absolute path to a python file or a relative path from the location the script was run.
Unit tests for the qtgui package are housed within each subpackage and should be specific to that subpackage, e.g. the fitting GUI tests are held in the Perspectives/Fitting/UnitTesting directory. All unit tests can be run or a small subset of tests can be run.
To run all unit tests from the base sasview directory: python src\sas\qtgui\GUITests.py
To run all a subset of tests from the base sasview directory: python src\sas\qtgui\GUITests.py <suiteName>
where the suiteName
is one of the options in the list GUITests.ALL_SUITES.
- View/Subscribe to the SasView Calendar
- Fortnightly developer's agenda/minutes
- Developer Guides
- Admin Processes and Procedure Notes
- Active Project Pages
- Historical Archive of Obsolete Pages
- Contributor e-Learning Course (free)
- Non Coding contribution needs/projects
- New functionality projects
- DRAFT for acknowledging contributions