Changes between Version 20 and Version 21 of Contribute/QA


Ignore:
Timestamp:
11/29/12 17:46:09 (9 years ago)
Author:
Pat Tressel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Contribute/QA

    v20 v21  
    7979
    8080=== Create a Generic Test Function for Report Tests ===
    81 Currently the Sahana test framework has a {{{create}}} function in {{{eden/modules/tests/web2unittests.py}}} which makes it simple to write tests for creating records. A similar function could be written for the Report Function: This would do the following:
    82 * Fill the search criteria in the simple and advanced form for the report (ideally this would re-use features from the Search function)
    83 * Fill the report options
    84 * Generate Report
    85 * Check the number of rows & columns
    86 * Check the contents of specific columns
     81Currently the Sahana test framework has a {{{create}}} function in {{{eden/modules/tests/web2unittests.py}}} which makes it simple to write tests for creating records. A similar function could be written for the Report Function. Ideally this would re-use features from / share code with the {{{search}}} helper described above -- it would be good to read that description. Because of this dependency, it might be better if this is done after {{{search}}}. Note for GCI: It's ok to claim this task if someone is working on {{{search}}}, and get a start on it. The {{{report}}} helper would do the following:
     82* Have parameters for:
     83 * The search query -- which fields to search on and their values. (See the description of parameters for the {{{search}}} helper above.)
     84 * The report options.
     85 * The expected results.
     86* Fill the search criteria in advanced form for the report.
     87* Fill the report options.
     88* Generate the report.
     89* Check that the results are exactly as given.
     90* If feasible, extend this to also test the simple report.
     91 * Can you use the same data to test the simple report form?
     92 * Does the caller need to tell you which field the simple report uses?
     93* Think about what code could be shared between your (((report))) function, the (((create))) function, and the {{{search}}} function task above.
    8794Test this function in at least one test script.
    8895
    8996----
    9097[wiki:Contribute]
     98[wiki:Contribute]