Changes between Version 11 and Version 12 of DeveloperGuidelines/Testing


Ignore:
Timestamp:
09/19/14 15:05:59 (11 years ago)
Author:
Arnav Sharma
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Testing

    v11 v12  
    44''"A bug is a test case you haven't written yet"''
    55
    6 ''"Unit Tests allow merciless [http://diveintopython.org/refactoring/refactoring.html refactoring]"''
    7 
    8 This page defines what our current approach versus our [wiki:BluePrintTesting BluePrint for future options]
    9 
    10 Test-Driven Development is a programming style which says that you 1st write your test cases (from the [BluePrint specs]) & then proceed to make them pass.
    116
    127== Automated Tests ==
    138
    14 === Smoke Tests ===
    15 Smoke Tests click through on every link within Sahana Eden and can be used to check for errors on pages and broken links. They are a light-weight approach to detecting basic errors, however they do not test form submission or any interaction. They can be run using [http://twill.idyll.org/ twill] or [http://jeanphix.me/Ghost.py/ Ghost.py]. Ghost is still under development and offers much more features than Twill.
    16 To run the Smoke Tests using Twill (use g for Ghost):
    17 {{{
    18 python web2py.py -S eden -M -R applications/eden/modules/tests/suite.py -A --suite smoke --agent t --force-debug --link-depth 7 -V 3
    19 }}}
    20 Before running smoke tests, check [http://eden.sahanafoundation.org/wiki/DeveloperGuidelines/Testing/Smoke Developer Guidelines - Smoke Tests] for installation and aditional options.
    219
    22 ===  Selenium Tests ===
     10===  EdenTest ===
    2311Selenium Tests use the [http://seleniumhq.org/docs/03_webdriver.jsp Selenium WebDriver] to simulate user interactions within a browser. They are very thorough as they test interactions in the entire Sahana Eden stack including JS, but can also be fragile (detect false negatives).
    2412
     
    2917
    3018
     19=== Smoke Tests ===
     20Smoke Tests click through on every link within Sahana Eden and can be used to check for errors on pages and broken links. They are a light-weight approach to detecting basic errors, however they do not test form submission or any interaction. They are run using EdenTest
     21
     22To run the Smoke Tests
     23{{{
     24python web2py.py --no-banner -M -S eden  -R applications/eden/tests/edentest_runner.py -A  smoke_tests  -o NONE -l NONE
     25}}}
     26Before running smoke tests, check [wiki:DeveloperGuidelines/EdenTest/WriteTestcase/Advanced#SmokeTests Smoke Tests] for additional options.
     27
     28
    3129=== Unit Tests ===
     30''"Unit Tests allow merciless [http://diveintopython.org/refactoring/refactoring.html refactoring]"''
     31
    3232Unit Tests can be used to test whether specific "Units" of code are working. They are used extensively to test the Sahana Eden "S3" Framework.
    33 Unit Tests require running with the IFRC_Train prepopulate:
     33Unit Tests require running with the following prepopulate:
    3434{{{
    35 settings.base.prepopulate = ["IFRC", "IFRC_Train"]
     35settings.base.prepopulate = ("default", "default/users")
    3636}}}
    3737To run all Unit Tests: