Version 1 (modified by Michael Howden, 12 years ago) ( diff )


Quality Assurance

Automated Tests

Unit Tests

There are additional unit tests available, which also require running with the IFRC_Train preopulate, 'settings.base.prepopulate = 27':

To run all unit tests:

python -S eden -M -R applications/eden/modules/unit_tests/

These unit tests are meant to detect problems early during development, which means you should run them quite often while you're still working on the code (read: before and after every little change you make) rather than expecting them to be run during QA cycles. That again means you would more often need to run tests for particular modules than the whole suite.

For every module in modules/s3 and modules/eden, you can find the corresponding unit test module under modules/unit_tests/eden resp. modules/unit_tests/s3 (if one exists).

To run tests for particular modules:

# e.g. for modules in modules/s3
python -S eden -M -R applications/eden/modules/unit_tests/s3/
# e.g. for modules in modules/eden
python -S eden -M -R applications/eden/modules/unit_tests/eden/

It can be a very powerful development strategy - especially for back-end APIs - to first implement unit test cases for the functionality you intend to implement before actually implementing it. Apart from preventing bugs, this helps you to validate your design against requirements, and to keep the implementation simple and focussed. Additionally, the test cases can be a rich source of code samples how to apply your API methods.

Smoke Tests

python -S eden -M -R applications/eden/modules/tests/ -A --suite smoke --force-debug --link-depth 16 -V 3

Selenium Tests

python -S eden -M -R applications/eden/modules/tests/

See: DeveloperGuidelines/Testing for more information

Role Tests

This test is used to check the permissions of user roles. Currently is limited to the IFRC (Red Cross) roles for RMS, but could be extended:

python -S eden -M -R applications/eden/modules/tests/ -A --suite roles

Benchmark Tests

The Benchmark Tests are a simple way of measuring the performance

python -S eden -M -R applications/eden/modules/unit_tests/s3/

Load Tests

Load Testing will measure the performance of the entire Sahana Eden stack. We recommend using Tsung. See: Testing/Load

Continuous Integration Server

See: SysAdmin/ContinuousIntegration

Test Cases

See: TestCases for more details - this page needs updating

Note: See TracWiki for help on using the wiki.