Changes between Initial Version and Version 1 of QA


Ignore:
Timestamp:
01/04/13 03:41:11 (13 years ago)
Author:
Michael Howden
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • QA

    v1 v1  
     1[[TOC]]
     2= Quality Assurance =
     3
     4== Automated Tests ==
     5
     6=== Unit Tests ===
     7There are additional unit tests available, which also require running with the IFRC_Train preopulate, 'settings.base.prepopulate = 27':
     8
     9To run all unit tests:
     10{{{
     11python web2py.py -S eden -M -R applications/eden/modules/unit_tests/suite.py
     12}}}
     13
     14These 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.
     15
     16For 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).
     17
     18To run tests for particular modules:
     19{{{
     20# e.g. for modules in modules/s3
     21python web2py.py -S eden -M -R applications/eden/modules/unit_tests/s3/s3resource.py
     22# e.g. for modules in modules/eden
     23python web2py.py -S eden -M -R applications/eden/modules/unit_tests/eden/pr.py
     24}}}
     25
     26It 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.
     27
     28=== Smoke Tests ===
     29{{{
     30python web2py.py -S eden -M -R applications/eden/modules/tests/suite.py -A --suite smoke --force-debug --link-depth 16 -V 3
     31}}}
     32===  Selenium Tests ===
     33{{{
     34python web2py.py -S eden -M -R applications/eden/modules/tests/suite.py
     35}}}
     36See: DeveloperGuidelines/Testing for more information
     37===  Role Tests ===
     38This 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:
     39{{{
     40python web2py.py -S eden -M -R applications/eden/modules/tests/suite.py -A --suite roles
     41}}}
     42===  Benchmark Tests ===
     43The Benchmark Tests are a simple way of measuring the performance
     44{{{
     45python web2py.py -S eden -M -R applications/eden/modules/unit_tests/s3/benchmark.py
     46}}}
     47===  Load Tests ===
     48Load Testing will measure the performance of the entire Sahana Eden stack. We recommend using Tsung. See: Testing/Load
     49
     50== Continuous Integration Server ==
     51See: SysAdmin/ContinuousIntegration
     52
     53== Test Cases ==
     54''See:'' TestCases for more details - this page needs updating
     55*  [https://docs.google.com/spreadsheet/ccc?key=0AmB3hMcgB-3idG1XNGhhRG9QWF81dUlKLXpJaFlCMFE#gid=8 Sahana Eden Test Cases Spreadsheet]
     56* Test Cases from Historic Deployments
     57 * TestCasesHaiti
     58 * TestCasesIndia
     59 * TestCasesJapan